private void checkIfRowExsits(String table, byte[] rowKey, String colName) {
Clause rkClause = QueryBuilder.eq("id", ByteBuffer.wrap(rowKey));
Clause cnClause = QueryBuilder.eq("colname", colName);
try {
Query query = QueryBuilder.select().all().from(keys, table).where(rkClause).and(cnClause);
ResultSet resultSet = session.execute(query);
if (resultSet.isExhausted())
return;
else {
Query delQuery = QueryBuilder.delete().from(keys, table).where(rkClause).and(cnClause);
session.execute(delQuery);
}
} catch (Exception e) {
System.out.println(" Exception:" + e.getMessage());
}