@Override public Configuration loadResourceConfiguration() throws Exception { Properties properties = new Properties(); properties.load(new FileInputStream(jvmOptsFile)); Configuration config = new Configuration(); String heapDumpOnOOMError = properties.getProperty("heap_dump_on_OOMError"); String heapDumpDir = properties.getProperty("heap_dump_dir"); config.put(new PropertySimple("minHeapSize", getHeapMinProp(properties))); config.put(new PropertySimple("maxHeapSize", getHeapMaxProp(properties))); config.put(new PropertySimple("heapNewSize", getHeapNewProp(properties))); config.put(new PropertySimple("threadStackSize", getStackSizeProp(properties))); if (!StringUtil.isEmpty(heapDumpOnOOMError)) { config.put(new PropertySimple("heapDumpOnOOMError", true)); } else { config.put(new PropertySimple("heapDumpOnOOMError", false)); } if (!StringUtil.isEmpty(heapDumpDir)) { config.put(new PropertySimple("heapDumpDir", heapDumpDir)); } else { File basedir = jvmOptsFile.getParentFile().getParentFile(); config.put(new PropertySimple("heapDumpDir", new File(basedir, "bin").getAbsolutePath())); } ConfigEditor yamlEditor = new ConfigEditor(cassandraYamlFile); yamlEditor.load(); config.put(new PropertySimple("cqlPort", yamlEditor.getNativeTransportPort())); config.put(new PropertySimple("gossipPort", yamlEditor.getStoragePort())); return config; }