protected static NavigableMap<byte[], NavigableMap<byte[], byte[]>> unwrapDeletesForRows( NavigableMap<byte[], NavigableMap<byte[], byte[]>> rows) { NavigableMap<byte[], NavigableMap<byte[], byte[]>> result = Maps.newTreeMap(Bytes.BYTES_COMPARATOR); for (Map.Entry<byte[], NavigableMap<byte[], byte[]>> row : rows.entrySet()) { NavigableMap<byte[], byte[]> rowMap = unwrapDeletes(row.getValue()); if (rowMap.size() > 0) { result.put(row.getKey(), rowMap); } } return result; }
protected static NavigableMap<byte[], NavigableMap<byte[], byte[]>> unwrapDeletesForRows( NavigableMap<byte[], NavigableMap<byte[], byte[]>> rows) { NavigableMap<byte[], NavigableMap<byte[], byte[]>> result = Maps.newTreeMap(Bytes.BYTES_COMPARATOR); for (Map.Entry<byte[], NavigableMap<byte[], byte[]>> row : rows.entrySet()) { NavigableMap<byte[], byte[]> rowMap = unwrapDeletes(row.getValue()); if (rowMap.size() > 0) { result.put(row.getKey(), rowMap); } } return result; }
private Map<byte[], byte[]> getRowMap(byte[] row) throws Exception { NavigableMap<byte[], byte[]> result = Maps.newTreeMap(Bytes.BYTES_COMPARATOR); // checking if the row was deleted inside this tx NavigableMap<byte[], Update> buffCols = buff.get(row); boolean rowDeleted = buffCols == null && buff.containsKey(row); if (rowDeleted) { return Collections.emptyMap(); } Map<byte[], byte[]> persisted = getPersisted(row, null); result.putAll(persisted); if (buffCols != null) { // buffered should override those returned from persistent store mergeToPersisted(result, buffCols, null); } return unwrapDeletes(result); }
private Map<byte[], byte[]> getRowMap(byte[] row) throws Exception { NavigableMap<byte[], byte[]> result = Maps.newTreeMap(Bytes.BYTES_COMPARATOR); // checking if the row was deleted inside this tx NavigableMap<byte[], Update> buffCols = buff.get(row); boolean rowDeleted = buffCols == null && buff.containsKey(row); if (rowDeleted) { return Collections.emptyMap(); } Map<byte[], byte[]> persisted = getPersisted(row, null); result.putAll(persisted); if (buffCols != null) { // buffered should override those returned from persistent store mergeToPersisted(result, buffCols, null); } return unwrapDeletes(result); }
return unwrapDeletes(result);
return unwrapDeletes(result);
result.add(new Result(row, unwrapDeletes(rowColumns)));
result.add(new Result(row, unwrapDeletes(rowColumns)));