The way to do it is by creating a class that implements me.prettyprint.hector.api.ClockResolution
// Define my own clock resolution.
class SequentialClockResolution implements ClockResolution {
@Override
public long createClock() {
return System.currentTimeMillis() * -1;
}
}
And now we have to tell Hector to use it.
CassandraHostConfigurator cassandraHostConfigurator = new CassandraHostConfigurator("localhost");
cassandraHostConfigurator.setClockResolution(new SequentialClockResolution());
cassandraHostConfigurator.setClockResolution(new SequentialClockResolution());
As an additional information, this is the class diagram involved in ClockResolution.

4 comments:
hi, new to the site, thanks.
hi, new to the site, thanks.
You haven't been updating your blog since ages and I'm one of your readers who a bit disappointed waiting on your new article. :( When will it be??
@mightystudents very soon! Thanks for the reminder. :)
Post a Comment