@Override public Collection<Pair<Mutation, byte[]>> getIndexUpdate(Mutation mutation, IndexMetaData indexMetaData) throws IOException { // create a state manager, so we can manage each batch LocalTableState state = new LocalTableState(localTable, mutation); // build the index updates for each group IndexUpdateManager manager = new IndexUpdateManager(indexMetaData); batchMutationAndAddUpdates(manager, state, mutation, indexMetaData); if (LOG.isTraceEnabled()) { LOG.trace("Found index updates for Mutation: " + mutation + "\n" + manager); } return manager.toMap(); }
LocalTableState table = new LocalTableState(state, m);
LocalTableState table = new LocalTableState(state, m);
Put pendingUpdate = new Put(row); pendingUpdate.addColumn(fam, qual, ts, val); LocalTableState table = new LocalTableState(state, pendingUpdate);
LocalTableState table = new LocalTableState(state, m);
LocalTableState table = new LocalTableState(state, m);
private void ensureNoUpdatesWhenCoveredByDelete(RegionCoprocessorEnvironment env, IndexCodec codec, List<Cell> currentState, Delete d) throws IOException { LocalHBaseState table = new SimpleTableState(Result.create(currentState)); LocalTableState state = new LocalTableState(table, d); state.setCurrentTimestamp(d.getTimeStamp()); // now we shouldn't see anything when getting the index update state.addPendingUpdates(d.getFamilyCellMap().get(FAMILY)); Iterable<IndexUpdate> updates = codec.getIndexUpserts(state, IndexMetaData.NULL_INDEX_META_DATA, null, null); for (IndexUpdate update : updates) { assertFalse("Had some index updates, though it should have been covered by the delete", update.isValid()); } } }
LocalTableState state = new LocalTableState(table, p); Iterable<IndexUpdate> updates = codec.getIndexDeletes(state, IndexMetaData.NULL_INDEX_META_DATA, null, null); assertFalse("Found index updates without any existing kvs in table!", updates.iterator().next() state = new LocalTableState(table, d); state.setCurrentTimestamp(2);
@Override public Collection<Pair<Mutation, byte[]>> getIndexUpdate(Mutation mutation, IndexMetaData indexMetaData) throws IOException { // create a state manager, so we can manage each batch LocalTableState state = new LocalTableState(localTable, mutation); // build the index updates for each group IndexUpdateManager manager = new IndexUpdateManager(indexMetaData); batchMutationAndAddUpdates(manager, state, mutation, indexMetaData); if (LOG.isTraceEnabled()) { LOG.trace("Found index updates for Mutation: " + mutation + "\n" + manager); } return manager.toMap(); }
@Override public Collection<Pair<Mutation, byte[]>> getIndexUpdate(Mutation mutation, IndexMetaData indexMetaData) throws IOException { // create a state manager, so we can manage each batch LocalTableState state = new LocalTableState(localTable, mutation); // build the index updates for each group IndexUpdateManager manager = new IndexUpdateManager(indexMetaData); batchMutationAndAddUpdates(manager, state, mutation, indexMetaData); if (LOG.isTraceEnabled()) { LOG.trace("Found index updates for Mutation: " + mutation + "\n" + manager); } return manager.toMap(); }