private static List<LogEntry> toLogEntry(List<KeySlice> rows) throws Exception, Throwable { List<LogEntry> logEntries = new ArrayList<LogEntry>(); if (rows == null || rows.size() == 0) { return logEntries; } for (KeySlice keySlice : rows) { if (keySlice.columns.size() > 0) { LogEntry logEntry = new LogEntry(); logEntry.setUuid(ByteBufferUtil.string(keySlice.key)); for (ColumnOrSuperColumn cc : keySlice.columns) { if (ConfigurationStore.getStore().shouldWriteColumns()) { ColumnOperation operation = new ColumnOperation(); operation.setName(cc.column.name); operation.setOperationType(cc.column.value); } else { switch (LogEntryColumns.valueOf(ByteBufferUtil.string(cc.column.name))) { case KS: logEntry.setKeyspace(ByteBufferUtil.string(cc.column.value)); break; case CF: logEntry.setColumnFamily(ByteBufferUtil.string(cc.column.value)); break; case ROW: logEntry.setRowKey(cc.column.value); break; case STATUS: logEntry.setStatus(LogEntryStatus.valueOf(ByteBufferUtil.string(cc.column.value))); break; case TIMESTAMP: logEntry.setTimestamp(Long.valueOf(ByteBufferUtil.string(cc.column.value))); break; case HOST: logEntry.setHost(ByteBufferUtil.string(cc.column.value)); break; } } } logEntries.add(logEntry); } } return logEntries; }