Package org.apache.drill.exec.store.hive
Class HiveMetadataProvider.HiveStats
java.lang.Object
org.apache.drill.exec.store.hive.HiveMetadataProvider.HiveStats
- Enclosing class:
- HiveMetadataProvider
Contains stats. Currently only numRows and totalSizeInBytes are used.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
long
long
getStatsFromProps
(Properties properties) Get the stats from table properties.toString()
boolean
valid()
Both numRows and sizeInBytes are expected to be greater than 0 for stats to be valid
-
Constructor Details
-
HiveStats
public HiveStats(long numRows, long sizeInBytes)
-
-
Method Details
-
getStatsFromProps
Get the stats from table properties. If not found -1 is returned for each stats field. CAUTION: stats may not be up-to-date with the underlying data. It is always good to run the ANALYZE command on Hive table to have up-to-date stats.- Parameters:
properties
- the source of table stats- Returns:
HiveMetadataProvider.HiveStats
instance with rows number and size in bytes from specified properties
-
getNumRows
public long getNumRows() -
getSizeInBytes
public long getSizeInBytes() -
valid
public boolean valid()Both numRows and sizeInBytes are expected to be greater than 0 for stats to be valid -
add
-
toString
-