use of org.apache.cassandra.db.RangeSliceCommand in project eiger by wlloyd.
the class RangeSliceVerbHandler method doVerb.
public void doVerb(Message message, String id) {
try {
if (StorageService.instance.isBootstrapMode()) {
/* Don't service reads! */
throw new RuntimeException("Cannot service reads while bootstrapping!");
}
RangeSliceCommand command = RangeSliceCommand.read(message);
ColumnFamilyStore cfs = Table.open(command.keyspace).getColumnFamilyStore(command.column_family);
RangeSliceReply reply = new RangeSliceReply(executeLocally(command));
Message response = reply.getReply(message);
if (logger.isDebugEnabled())
logger.debug("Sending " + reply + " to " + id + "@" + message.getFrom());
MessagingService.instance().sendReply(response, id, message.getFrom());
} catch (Exception ex) {
throw new RuntimeException(ex);
}
}
Aggregations