Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@


public abstract class BaseRegionObserver implements RegionObserver, RegionCoprocessor {

@Override
public InternalScanner preCompact(ObserverContext<RegionCoprocessorEnvironment> c,
Store store,
InternalScanner scanner,
Expand All @@ -36,7 +38,7 @@ public InternalScanner preCompact(ObserverContext<RegionCoprocessorEnvironment>
return preCompact(c,store,scanner,scanType,request);
}

public InternalScanner preCompact(ObserverContext<RegionCoprocessorEnvironment> env,
protected InternalScanner preCompact(ObserverContext<RegionCoprocessorEnvironment> env,
Store store,
InternalScanner scanner,
ScanType scanType,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public class CompactorScanner implements InternalScanner {
private List<Cell> currentRowWorthValues = new ArrayList<Cell>();
private final LRUMap<Long ,Optional<CommitTimestamp>> commitCache;

public CompactorScanner(ObserverContext<RegionCoprocessorEnvironment> e,
public CompactorScanner(ObserverContext<RegionCoprocessorEnvironment> c,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unrelated cleanup

InternalScanner internalScanner,
Client commitTableClient,
boolean isMajorCompaction,
Expand All @@ -77,7 +77,7 @@ public CompactorScanner(ObserverContext<RegionCoprocessorEnvironment> e,
this.retainNonTransactionallyDeletedCells = preserveNonTransactionallyDeletedCells;
this.lowWatermark = getLowWatermarkFromCommitTable();
// Obtain the table in which the scanner is going to operate
this.hRegion = e.getEnvironment().getRegion();
this.hRegion = c.getEnvironment().getRegion();
commitCache = new LRUMap<>(1000);
LOG.info("Scanner cleaning up uncommitted txs older than LW [{}] in region [{}]",
lowWatermark, hRegion.getRegionInfo());
Expand All @@ -94,7 +94,7 @@ public boolean next(List<Cell> result, ScannerContext scannerContext) throws IOE
return next(result, limit);
}

public boolean next(List<Cell> result, int limit) throws IOException {
protected boolean next(List<Cell> result, int limit) throws IOException {

if (currentRowWorthValues.isEmpty()) {
// 1) Read next row
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@
import org.slf4j.LoggerFactory;

import java.io.IOException;
import java.util.Queue;
import java.util.concurrent.ConcurrentLinkedQueue;

import static org.apache.omid.committable.hbase.HBaseCommitTableConfig.COMMIT_TABLE_NAME_KEY;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@

import org.apache.hadoop.hbase.coprocessor.BaseRegionObserver;
import org.apache.hadoop.hbase.filter.Filter;
import org.apache.hadoop.hbase.regionserver.RegionScanner;


import org.apache.hadoop.hbase.util.Bytes;
import org.apache.omid.committable.CommitTable;
Expand Down Expand Up @@ -100,7 +98,7 @@ public void stop(CoprocessorEnvironment e) throws IOException {
}


// Don't add an @Override tag since this method doesn't exist in both hbase-1 and hbase-2
@Override
public void postGetOp(ObserverContext<RegionCoprocessorEnvironment> e, Get get, List<Cell> results) {
SnapshotFilterImpl snapshotFilter = snapshotFilterMap.get(get);
if (snapshotFilter != null) {
Expand All @@ -109,7 +107,7 @@ public void postGetOp(ObserverContext<RegionCoprocessorEnvironment> e, Get get,
}


// Don't add an @Override tag since this method doesn't exist in both hbase-1 and hbase-2
@Override
public void preGetOp(ObserverContext<RegionCoprocessorEnvironment> e, Get get, List<Cell> results)
throws IOException {

Expand Down Expand Up @@ -137,17 +135,7 @@ private SnapshotFilterImpl getSnapshotFilter(ObserverContext<RegionCoprocessorEn
return snapshotFilter;
}


// Don't add an @Override tag since this method doesn't exist in both hbase-1 and hbase-2
public RegionScanner preScannerOpen(ObserverContext<RegionCoprocessorEnvironment> e,
Scan scan,
RegionScanner s) throws IOException {
preScannerOpen(e,scan);
return s;
}


// Don't add an @Override tag since this method doesn't exist in both hbase-1 and hbase-2
@Override
public void preScannerOpen(ObserverContext<RegionCoprocessorEnvironment> e,
Scan scan) throws IOException {
byte[] byteTransaction = scan.getAttribute(CellUtils.TRANSACTION_ATTRIBUTE);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,11 @@
import org.apache.hadoop.hbase.regionserver.InternalScanner;
import org.apache.hadoop.hbase.util.Bytes;
import org.apache.omid.committable.CommitTable;
import org.apache.omid.committable.CommitTable.Client;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;

import java.util.Queue;

import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.spy;
import static org.mockito.Mockito.when;
Expand Down