public IterConfig decompress(ByteBuffer iterators) { IterConfig config = new IterConfig(); UnsynchronizedBuffer.Reader in = new UnsynchronizedBuffer.Reader(iterators); int num = in.readVInt(); for (int i = 0; i < num; i++) { String name = symbolTable.get(in.readVInt()); String iterClass = symbolTable.get(in.readVInt()); int prio = in.readVInt(); config.ssiList.add(new IterInfo(prio, iterClass, name)); int numOpts = in.readVInt(); HashMap<String,String> opts = new HashMap<>(); for (int j = 0; j < numOpts; j++) { String key = symbolTable.get(in.readVInt()); String val = symbolTable.get(in.readVInt()); opts.put(key, val); } config.ssio.put(name, opts); } return config; }
UnsynchronizedBuffer.Reader din = new UnsynchronizedBuffer.Reader(localData); buffer = new UnsynchronizedBuffer.Writer(); for (int i = 0; i < localEntries; i++) {
/** * Gets the modifications and deletions in this mutation. After calling this method, further * modifications to this mutation are ignored. Changes made to the returned updates do not affect * this mutation. * * @return list of modifications and deletions */ public List<ColumnUpdate> getUpdates() { serialize(); UnsynchronizedBuffer.Reader in = new UnsynchronizedBuffer.Reader(data); if (updates == null) { if (entries == 1) { updates = Collections.singletonList(deserializeColumnUpdate(in)); } else { ColumnUpdate[] tmpUpdates = new ColumnUpdate[entries]; for (int i = 0; i < entries; i++) tmpUpdates[i] = deserializeColumnUpdate(in); updates = Arrays.asList(tmpUpdates); } } return updates; }
UnsynchronizedBuffer.Reader din = new UnsynchronizedBuffer.Reader(localData); buffer = new UnsynchronizedBuffer.Writer(); for (int i = 0; i < localEntries; i++) {
/** * Gets the modifications and deletions in this mutation. After calling this method, further * modifications to this mutation are ignored. Changes made to the returned updates do not affect * this mutation. * * @return list of modifications and deletions */ public List<ColumnUpdate> getUpdates() { serialize(); UnsynchronizedBuffer.Reader in = new UnsynchronizedBuffer.Reader(data); if (updates == null) { if (entries == 1) { updates = Collections.singletonList(deserializeColumnUpdate(in)); } else { ColumnUpdate[] tmpUpdates = new ColumnUpdate[entries]; for (int i = 0; i < entries; i++) tmpUpdates[i] = deserializeColumnUpdate(in); updates = Arrays.asList(tmpUpdates); } } return updates; }
public IterConfig decompress(ByteBuffer iterators) { IterConfig config = new IterConfig(); UnsynchronizedBuffer.Reader in = new UnsynchronizedBuffer.Reader(iterators); int num = in.readVInt(); for (int i = 0; i < num; i++) { String name = symbolTable.get(in.readVInt()); String iterClass = symbolTable.get(in.readVInt()); int prio = in.readVInt(); config.ssiList.add(new IterInfo(prio, iterClass, name)); int numOpts = in.readVInt(); HashMap<String,String> opts = new HashMap<>(); for (int j = 0; j < numOpts; j++) { String key = symbolTable.get(in.readVInt()); String val = symbolTable.get(in.readVInt()); opts.put(key, val); } config.ssio.put(name, opts); } return config; }