HBASE-15380 Purge rollback support in Store etc.

This commit is contained in:
stack 2016-04-07 22:35:23 -07:00
parent 394b89d153
commit e450d94a2c
4 changed files with 4 additions and 44 deletions

View File

@ -226,23 +226,6 @@ public abstract class AbstractMemStore implements MemStore {
return getSnapshot().getSize();
}
/**
* Remove n key from the memstore. Only cells that have the same key and the
* same memstoreTS are removed. It is ok to not update timeRangeTracker
* in this call. It is possible that we can optimize this method by using
* tailMap/iterator, but since this method is called rarely (only for
* error recovery), we can leave those optimization for the future.
* @param cell
*/
@Override
public void rollback(Cell cell) {
// If the key is in the active, delete it. Update this.size.
long sz = active.rollback(cell);
if (sz != 0) {
setOldestEditTimeToNow();
}
}
@Override
public String toString() {
StringBuffer buf = new StringBuffer();

View File

@ -646,16 +646,6 @@ public class HStore implements Store {
}
}
@Override
public void rollback(final Cell cell) {
lock.readLock().lock();
try {
this.memstore.rollback(cell);
} finally {
lock.readLock().unlock();
}
}
/**
* @return All store files.
*/
@ -1817,8 +1807,10 @@ public class HStore implements Store {
try {
// Not split-able if we find a reference store file present in the store.
boolean result = !hasReferences();
if (!result && LOG.isDebugEnabled()) {
LOG.debug("Cannot split region due to reference files being there");
if (!result) {
if (LOG.isTraceEnabled()) {
LOG.trace("Not splittable; has references: " + this);
}
}
return result;
} finally {

View File

@ -86,13 +86,6 @@ public interface MemStore extends HeapSize {
*/
long timeOfOldestEdit();
/**
* Remove n key from the memstore. Only kvs that have the same key and the same memstoreTS are
* removed. It is ok to not update timeRangeTracker in this call.
* @param cell
*/
void rollback(final Cell cell);
/**
* Write a delete
* @param deleteCell

View File

@ -154,14 +154,6 @@ public interface Store extends HeapSize, StoreConfigInformation, PropagatingConf
*/
long timeOfOldestEdit();
/**
* Removes a Cell from the memstore. The Cell is removed only if its key
* & memstoreTS match the key & memstoreTS value of the cell
* parameter.
* @param cell
*/
void rollback(final Cell cell);
FileSystem getFileSystem();