@InternalApi(value="For internal usage only") public abstract class SampledRowKeysAdapter extends Object
For internal use only - public for technical reasons.
| Modifier and Type | Field and Description |
|---|---|
protected static Logger |
LOG
Constant
LOG |
protected org.apache.hadoop.hbase.ServerName |
serverName |
protected org.apache.hadoop.hbase.TableName |
tableName |
| Constructor and Description |
|---|
SampledRowKeysAdapter(org.apache.hadoop.hbase.TableName tableName,
org.apache.hadoop.hbase.ServerName serverName)
Constructor for SampledRowKeysAdapter.
|
| Modifier and Type | Method and Description |
|---|---|
List<org.apache.hadoop.hbase.HRegionLocation> |
adaptResponse(List<com.google.cloud.bigtable.data.v2.models.KeyOffset> responses)
adaptResponse.
|
protected abstract org.apache.hadoop.hbase.HRegionLocation |
createRegionLocation(byte[] startKey,
byte[] endKey)
HBase 1.x and 2.x have non compatible
HRegionInfo classes. |
protected static final Logger LOG
LOGprotected final org.apache.hadoop.hbase.TableName tableName
protected final org.apache.hadoop.hbase.ServerName serverName
public SampledRowKeysAdapter(org.apache.hadoop.hbase.TableName tableName,
org.apache.hadoop.hbase.ServerName serverName)
tableName - a TableName object.serverName - a ServerName object.public List<org.apache.hadoop.hbase.HRegionLocation> adaptResponse(List<com.google.cloud.bigtable.data.v2.models.KeyOffset> responses)
protected abstract org.apache.hadoop.hbase.HRegionLocation createRegionLocation(byte[] startKey,
byte[] endKey)
HRegionInfo classes. HBase 2.x introduces a
RegionInfo interface, which makes the two hbase classes with the same name binary incompatible.
HRegionLocation uses RegionInfo instead of HRegionInfo, causing confusion and
delay. AbstractBigtableConnection.getRegionLocator(TableName) calls an abstract method
which subclasses will construct appropriate SampledRowKeysAdapter implementations.startKey - a byte array.endKey - a byte array.HRegionLocation object.