/** * Delete the entry from wall. * * @param followEntry */ public void deleteEntry(String username, String id) { try { // find name of super column using reverse mapping from id to time UUID uuid = UUIDUtil.fromString(id); final byte[] idAsBytes = UUIDUtil.toBytes(uuid); byte[] timeUUIDAsBytes = getTimeUUIDFromID(username, idAsBytes); if (timeUUIDAsBytes == null) { throw new TrendOceanException("Can not find time uuid " + username + ":" + id); } // delete super column from wall cf Mutator mutator = Pelops.createMutator(TRENDOCEAN_POOL, TRENDOCEAN_KEYSPACE); mutator.deleteColumn(username, WALL_CF, timeUUIDAsBytes); // also delete from reverse mapping from id to time mutator.deleteColumn(username, ID_TO_TIMEUUID_CF, idAsBytes); mutator.execute(ConsistencyLevel.QUORUM); } catch (Exception ex) { logger.error("Can not delete follow entry", username + ":" + id, ex); throw new TrendOceanException(ex); } }