def flushSSTableToCassandra(cassHosts: String, dir: String): Unit = { val conf=new Configuration() val shuffledCassHosts=Random.shuffle(cassHosts.split(",").toList) val selectedCassHost=shuffledCassHosts.head conf.set("cassandra.output.thrift.address", selectedCassHost) new SSTableLoader(new File(dir), new ExternalClient(conf), new OutputHandler.LogOutput).stream().get() }