com.datastax.driver.core.exceptions.InvalidQueryException: unconfigured table schema_keyspaces

The problem is that Spring Data Cassandra (as of December 2015 when I write this) does not provide support for Cassandra 3.x. Here’s an excerpt from a conversation with one of the developers in the #spring channel on freenode: [13:49] <_amicable> Hi all, does anybody know if spring data cassandra supports cassandra 3.x? All dependencies … Read more

Is there a reason not to use SparkContext.getOrCreate when writing a spark job?

TL;DR There are many legitimate applications of the getOrCreate methods but attempt to find a loophole to perform map-side joins is not one of them. In general there is nothing deeply wrong with SparkContext.getOrCreate. The method has its applications, and although there some caveats, most notably: In its simplest form it doesn’t allow you to … Read more

Cassandra – Is there a way to limit number of async queries?

You can use a semaphore to throttle the number of concurrent queries: final Semaphore semaphore = new Semaphore(numberOfConcurrentQueries); … semaphore.acquire(); try { ResultSetFuture future = session.executeAsync(“…”); Futures.addCallback(future, new FutureCallback<ResultSet>() { @Override public void onSuccess(ResultSet result) { semaphore.release(); } @Override public void onFailure(Throwable t) { semaphore.release(); } }); } catch (Exception e) { semaphore.release(); } But … Read more