HBASE-11919 Remove the deprecated pre/postGet CP hook.

This commit is contained in:
anoopsjohn 2014-09-09 22:32:41 +05:30
parent 7ea085beb8
commit 0259d27341
2 changed files with 0 additions and 62 deletions

View File

@ -16,7 +16,6 @@
package org.apache.hadoop.hbase.coprocessor;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.NavigableSet;
@ -28,8 +27,6 @@ import org.apache.hadoop.hbase.Cell;
import org.apache.hadoop.hbase.CoprocessorEnvironment;
import org.apache.hadoop.hbase.HBaseInterfaceAudience;
import org.apache.hadoop.hbase.HRegionInfo;
import org.apache.hadoop.hbase.KeyValue;
import org.apache.hadoop.hbase.KeyValueUtil;
import org.apache.hadoop.hbase.client.Append;
import org.apache.hadoop.hbase.client.Delete;
import org.apache.hadoop.hbase.client.Durability;
@ -235,54 +232,13 @@ public abstract class BaseRegionObserver implements RegionObserver {
@Override
public void preGetOp(final ObserverContext<RegionCoprocessorEnvironment> e,
final Get get, final List<Cell> results) throws IOException {
// By default we are executing the deprecated preGet to support legacy RegionObservers
// We may use the results coming in and we may return the results going out.
List<KeyValue> kvs = new ArrayList<KeyValue>(results.size());
for (Cell c : results) {
kvs.add(KeyValueUtil.ensureKeyValue(c));
}
preGet(e, get, kvs);
results.clear();
results.addAll(kvs);
}
/**
* WARNING: please override preGetOp instead of this method. This is to maintain some
* compatibility and to ease the transition from 0.94 -> 0.96. It is super inefficient!
*/
@Deprecated
@Override
public void preGet(final ObserverContext<RegionCoprocessorEnvironment> c, final Get get,
final List<KeyValue> result)
throws IOException {
}
@Override
public void postGetOp(final ObserverContext<RegionCoprocessorEnvironment> e,
final Get get, final List<Cell> results) throws IOException {
// By default we are executing the deprecated preGet to support legacy RegionObservers
// We may use the results coming in and we may return the results going out.
List<KeyValue> kvs = new ArrayList<KeyValue>(results.size());
for (Cell c : results) {
kvs.add(KeyValueUtil.ensureKeyValue(c));
}
postGet(e, get, kvs);
results.clear();
results.addAll(kvs);
}
/**
* WARNING: please override postGetOp instead of this method. This is to maintain some
* compatibility and to ease the transition from 0.94 -> 0.96. It is super inefficient!
*/
@Deprecated
@Override
public void postGet(final ObserverContext<RegionCoprocessorEnvironment> c, final Get get,
final List<KeyValue> result)
throws IOException {
}
@Override
public boolean preExists(final ObserverContext<RegionCoprocessorEnvironment> e,
final Get get, final boolean exists) throws IOException {

View File

@ -475,15 +475,6 @@ public interface RegionObserver extends Coprocessor {
final List<Cell> result)
throws IOException;
/**
* WARNING: please override preGetOp instead of this method. This is to maintain some
* compatibility and to ease the transition from 0.94 -> 0.96.
*/
@Deprecated
void preGet(final ObserverContext<RegionCoprocessorEnvironment> c, final Get get,
final List<KeyValue> result)
throws IOException;
/**
* Called after the client performs a Get
* <p>
@ -498,15 +489,6 @@ public interface RegionObserver extends Coprocessor {
final List<Cell> result)
throws IOException;
/**
* WARNING: please override postGetOp instead of this method. This is to maintain some
* compatibility and to ease the transition from 0.94 -> 0.96.
*/
@Deprecated
void postGet(final ObserverContext<RegionCoprocessorEnvironment> c, final Get get,
final List<KeyValue> result)
throws IOException;
/**
* Called before the client tests for existence using a Get.
* <p>