我想知道如何查询蜂巢metastore数据库,并抓住几个关键特性包括:查询蜂巢元店
- 创建日期
- 最后更新日期
- 最后访问日期
我刚刚了解到配置单元show table extend like <tablename>
0 tableName:<tablename>
1 owner:<userid>
2 location:hdfs://NameService-705/user/hive/warehouse/<username>.db/<tablename>
3 inputformat:org.apache.hadoop.mapred.TextInputFormat
4 outputformat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
5 columns:struct columns { i64 ingestts, i64 ingestdate .... map<string,string> params}
6 partitioned:false
7 partitionColumns:
8 totalNumberFiles:1
9 totalFileSize:0
10 maxFileSize:0
11 minFileSize:0
12 lastAccessTime:1453767099408 -> Mon Jan 25 2016 17:11:39 GMT-0700 (MST)
13 lastUpdateTime:1432218969243 -> Thu May 21 2015 08:36:09 GMT-0600 (MDT)
我知道field0,1,12和13正是信息,我想知道如何查询蜂房元存储来直接获取这些信息,而不是运行show table extend
千次。例如:
select tableName, owner, lastAccessTime, lastUpdateTime from <metatable>
谢谢!