Created
May 1, 2018 13:22
-
-
Save therako/f28ba3658a9ffecb956a73492b98660c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment