@Override public int hashCode() { return getStoreName().hashCode() + getRowKey().hashCode() + getColumnName().hashCode(); } }
@Override public String toString() { return "-" + getStoreName() + "/" + getRowKey() + "/" + getColumnName(); }
/** * Get the map of the column deletes as storeName -> rowKey -> list of column names */ public Map<String, Map<String, List<String>>> getColumnDeletesMap() { Map<String, Map<String, List<String>>> storeMap = new HashMap<>(); for(ColumnDelete mutation: getColumnDeletes()) { String storeName = mutation.getStoreName(); String rowKey = mutation.getRowKey(); String column = mutation.getColumnName(); Map<String, List<String>> rowMap = storeMap.get(storeName); if(rowMap == null) { rowMap = new HashMap<>(); storeMap.put(storeName, rowMap); } List<String> columnsList = rowMap.get(rowKey); if(columnsList == null) { columnsList = new ArrayList<>(); rowMap.put(rowKey, columnsList); } columnsList.add(column); } return storeMap; }
String rowKey = mutation.getRowKey(); String column = mutation.getColumnName();
ks.stores.put(table, store); String row = mutation.getRowKey(); Row mrow = store.rows.get(row); if(mrow == null) {
private List<BoundStatement> getMutations(DBTransaction transaction) { List<BoundStatement> mutations = new ArrayList<>(); for(ColumnUpdate value: transaction.getColumnUpdates()) { boolean isBinaryValue = m_dbservice.columnValueIsBinary(value.getStoreName()); BoundStatement bstmt = addColumnUpdate(value.getStoreName(), value.getRowKey(), value.getColumn(), isBinaryValue); mutations.add(bstmt); } for(ColumnDelete value: transaction.getColumnDeletes()) { BoundStatement bstmt = addColumnDelete(value.getStoreName(), value.getRowKey(), value.getColumnName()); mutations.add(bstmt); } for(RowDelete value: transaction.getRowDeletes()) { BoundStatement bstmt = addRowDelete(value.getStoreName(), value.getRowKey()); mutations.add(bstmt); } return mutations; }
String row = mutation.getRowKey(); String column = mutation.getColumnName(); final String path = keyspace + "/" + store + "/" + encode(row) + "/" + encode(column);
Map<String, AttributeValue> item = getPrimaryKey(mutation.getStoreName() + "_" + mutation.getRowKey(), mutation.getColumnName()); list.add(new WriteRequest().withDeleteRequest(new DeleteRequest(item)));
String rowKey = mutation.getRowKey(); String columnName = mutation.getColumnName(); datastoreTransaction.deleteColumn(storeName, rowKey, columnName);