private static Put clonePut(Put put) { long startId = 0; long commitId = 1; Put ret = new Put(put.getRow()); Map<byte[], List<KeyValue>> families = put.getFamilyMap(); Columns cols = new Columns(null); for (byte[] family : families.keySet()) { List<KeyValue> columns = families.get(family); Iterator<KeyValue> it = columns.iterator(); while (it.hasNext()) { KeyValue kv = it.next(); // byte[] column = DominoConst.getColumnKey(kv.getQualifier(), startId); byte[] qualifier = kv.getQualifier(); ret.add(family, qualifier, startId, kv.getValue()); cols.add(family, qualifier); } } Map<String, byte[]> attributes = put.getAttributesMap(); for (String key : attributes.keySet()) { ret.setAttribute(key, attributes.get(key)); } ret.add(DominoConst.INNER_FAMILY, DominoConst.COLUMNS_COL, startId, cols.toByteArray()); ret.add(DominoConst.INNER_FAMILY, DominoConst.VERSION_COL, commitId, DominoConst.versionValue(startId, false)); return ret; }
DominoConst.STATUS_COL, startId, KeyValue.Type.Delete); commit.add(clearStatusKV); byte[] value = DominoConst.versionValue(startId, isDelete); if (isFresh) { KeyValue commitKV = new KeyValue(row, DominoConst.INNER_FAMILY,
private static KeyValue commitRow(HTableWrapper tableWrapper, KeyValue statusKV, long startId, long commitId, Integer lockId) { byte[] row = statusKV.getRow(); boolean isDelete = DominoConst.isDelete(statusKV.getValue()); try { tableWrapper.commitRow(row, startId, commitId, isDelete, lockId); } catch (IOException ioe) { } byte[] value = DominoConst.versionValue(startId, isDelete); KeyValue commitKV = new KeyValue(row, DominoConst.INNER_FAMILY, DominoConst.VERSION_COL, commitId, value); return commitKV; }
Integer lockId) throws IOException { KeyValue commitKV = new KeyValue(row, DominoConst.INNER_FAMILY, DominoConst.VERSION_COL, commitId, DominoConst.versionValue(startId, isDelete)); NavigableSet<KeyValue> orderedVersions = new TreeSet<KeyValue>(