public static final SortedMap<Key,Value> decodeRow(Key rowKey, Value rowValue) throws IOException { SortedMap<Key,Value> map = new TreeMap<>(); ByteArrayInputStream in = new ByteArrayInputStream(rowValue.get()); DataInputStream din = new DataInputStream(in); int numKeys = din.readInt(); for (int i = 0; i < numKeys; i++) { byte[] cf = readField(din); // read the col fam byte[] cq = readField(din); // read the col qual byte[] cv = readField(din); // read the col visibility long timestamp = din.readLong(); // read the timestamp byte[] valBytes = readField(din); // read the value map.put(new Key(rowKey.getRowData().toArray(), cf, cq, cv, timestamp, false, false), new Value(valBytes, false)); } return map; }
public static final SortedMap<Key,Value> decodeRow(Key rowKey, Value rowValue) throws IOException { SortedMap<Key,Value> map = new TreeMap<>(); ByteArrayInputStream in = new ByteArrayInputStream(rowValue.get()); DataInputStream din = new DataInputStream(in); int numKeys = din.readInt(); for (int i = 0; i < numKeys; i++) { byte[] cf = readField(din); // read the col fam byte[] cq = readField(din); // read the col qual byte[] cv = readField(din); // read the col visibility long timestamp = din.readLong(); // read the timestamp byte[] valBytes = readField(din); // read the value map.put(new Key(rowKey.getRowData().toArray(), cf, cq, cv, timestamp, false, false), new Value(valBytes, false)); } return map; }