Class TableStatsCalculator
java.lang.Object
org.apache.drill.exec.store.hbase.TableStatsCalculator
Computes size of each region for given table.
-
Field Summary
-
Constructor Summary
ConstructorDescriptionTableStatsCalculator
(org.apache.hadoop.hbase.client.Connection connection, HBaseScanSpec hbaseScanSpec, DrillConfig config, HBaseStoragePluginConfig storageConfig) Computes size of each region for table. -
Method Summary
Modifier and TypeMethodDescriptionint
int
long
getRegionSizeInBytes
(byte[] regionId) Returns size of given region in bytes.boolean
-
Field Details
-
DEFAULT_ROW_COUNT
public static final long DEFAULT_ROW_COUNT- See Also:
-
-
Constructor Details
-
TableStatsCalculator
public TableStatsCalculator(org.apache.hadoop.hbase.client.Connection connection, HBaseScanSpec hbaseScanSpec, DrillConfig config, HBaseStoragePluginConfig storageConfig) throws IOException Computes size of each region for table.- Parameters:
connection
- connection to Hbase clienthbaseScanSpec
- scan specificationconfig
- drill configurationstorageConfig
- Hbase storage configuration- Throws:
IOException
-
-
Method Details
-
getRegionSizeInBytes
public long getRegionSizeInBytes(byte[] regionId) Returns size of given region in bytes. Returns 0 if region was not found. -
getAvgRowSizeInBytes
public int getAvgRowSizeInBytes() -
getColsPerRow
public int getColsPerRow() -
usedDefaultRowCount
public boolean usedDefaultRowCount()
-