com.google.cloud.bigtable.hbase.adapters
Class SampledRowKeysAdapter
- java.lang.Object
-
- com.google.cloud.bigtable.hbase.adapters.SampledRowKeysAdapter
-
public abstract class SampledRowKeysAdapter extends Object
SampledRowKeysAdapter class.- Version:
- $Id: $Id
- Author:
- sduskis
-
-
Field Summary
Fields Modifier and Type Field and Description protected static Logger
LOG
ConstantLOG
protected ServerName
serverName
protected TableName
tableName
-
Constructor Summary
Constructors Constructor and Description SampledRowKeysAdapter(TableName tableName, ServerName serverName)
Constructor for SampledRowKeysAdapter.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method and Description List<HRegionLocation>
adaptResponse(List<com.google.cloud.bigtable.data.v2.models.KeyOffset> responses)
adaptResponse.protected abstract HRegionLocation
createRegionLocation(byte[] startKey, byte[] endKey)
HBase 1.x and 2.x have non compatibleHRegionInfo
classes.
-
-
-
Field Detail
-
LOG
protected static final Logger LOG
ConstantLOG
-
tableName
protected final TableName tableName
-
serverName
protected final ServerName serverName
-
-
Constructor Detail
-
SampledRowKeysAdapter
public SampledRowKeysAdapter(TableName tableName, ServerName serverName)
Constructor for SampledRowKeysAdapter.- Parameters:
tableName
- aTableName
object.serverName
- aServerName
object.
-
-
Method Detail
-
adaptResponse
public List<HRegionLocation> adaptResponse(List<com.google.cloud.bigtable.data.v2.models.KeyOffset> responses)
adaptResponse.
-
createRegionLocation
protected abstract HRegionLocation createRegionLocation(byte[] startKey, byte[] endKey)
HBase 1.x and 2.x have non compatibleHRegionInfo
classes. HBase 2.x introduces a RegionInfo interface, which makes the two hbase classes with the same name binary incompatible.HRegionLocation
uses RegionInfo instead ofHRegionInfo
, causing confusion and delay.AbstractBigtableConnection.getRegionLocator(TableName)
calls an abstract method which subclasses will construct appropriateSampledRowKeysAdapter
implementations.- Parameters:
startKey
- a byte array.endKey
- a byte array.- Returns:
- a
HRegionLocation
object.
-
-