/** * Add an index update. Keeps the latest {@link Put} for a given timestamp * @param tableName * @param m */ public void addIndexUpdate(byte[] tableName, Mutation m) { // we only keep the most recent update ImmutableBytesPtr key = new ImmutableBytesPtr(tableName); Collection<Mutation> updates = map.get(key); if (updates == null) { updates = new TreeSet<Mutation>(COMPARATOR); map.put(key, updates); } if (indexMetaData.getReplayWrite() != null) { // if we're replaying mutations, we don't need to worry about out-of-order updates updates.add(m); } else { fixUpCurrentUpdates(updates, m); } }
/** * Add an index update. Keeps the latest {@link Put} for a given timestamp * @param tableName * @param m */ public void addIndexUpdate(byte[] tableName, Mutation m) { // we only keep the most recent update ImmutableBytesPtr key = new ImmutableBytesPtr(tableName); Collection<Mutation> updates = map.get(key); if (updates == null) { updates = new TreeSet<Mutation>(COMPARATOR); map.put(key, updates); } if (indexMetaData.getReplayWrite() != null) { // if we're replaying mutations, we don't need to worry about out-of-order updates updates.add(m); } else { fixUpCurrentUpdates(updates, m); } }
/** * Add an index update. Keeps the latest {@link Put} for a given timestamp * @param tableName * @param m */ public void addIndexUpdate(byte[] tableName, Mutation m) { // we only keep the most recent update ImmutableBytesPtr key = new ImmutableBytesPtr(tableName); Collection<Mutation> updates = map.get(key); if (updates == null) { updates = new TreeSet<Mutation>(COMPARATOR); map.put(key, updates); } if (indexMetaData.getReplayWrite() != null) { // if we're replaying mutations, we don't need to worry about out-of-order updates updates.add(m); } else { fixUpCurrentUpdates(updates, m); } }