Advertisement
josephxsxn

Debugging Hive Stats

May 10th, 2017
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.67 KB | None | 0 0
  1. Assuming this is a debugging scenario & all you care about is looking at them somehow.
  2.  
  3. HIVE_CONF_DIR=/etc/hive2/conf/conf.server/ hive --service metatool -executeJDOQL 'select dbName+"."+tableName+"::"+colName+"="+numDVs from org.apache.hadoop.hive.metastore.model.MTableColumnStatistics';
  4.  
  5. HIVE_CONF_DIR=/etc/hive2/conf/conf.server/ hive --service metatool -executeJDOQL 'select dbName+"."+tableName+"("+partitionName+")::"+colName+"="+numDVs from org.apache.hadoop.hive.metastore.model.MPartitionColumnStatistics';
  6.  
  7. You can also read out numNulls, but the min-max etc require you to know the column type ahead of time, like longHighValue or longLowValue for all integers.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement