hive partition 分区详解一
2016-03-19 22:42
429 查看
一.查看分区命令
1.show partitions xxx
hive> show partitions xxx;
OK
day=20150908
day=20151020
day=20151021
day=20151022
...
day=20160318
Time taken: 0.139 seconds, Fetched: 144 row(s)
由此可见上述命令显示了基本的分区情况
2.desc xxx partition(day=20160315
hive> desc xxx partition(day=20160315);
OK
list_time string
cookie string
device_id string
os string
device_brand string
search_id string
search_guid string
...
filter string
day string
# Partition Information
# col_name data_type comment
day string
Time taken: 0.359 seconds, Fetched: 36 row(s)
此命令显示了表结构与partition information
3.
hive> desc extended ods_search_log_app partition(day=20160315);
OK
list_time string
cookie string
device_id string
os string
device_brand string
search_id string
search_guid string
...
coupon string
filter string
day string
# Partition Information
# col_name data_type comment
day string
Detailed Partition Information Partition(values:[20160315], dbName:xxx, tableName:xxx, ............. location:hdfs://mycluster/data/hive/warehouse/xxx/xxx/day=20160315, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat,
compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[], parameters:{}, skewedInfo:SkewedInfo(skewedColNames:[], skewedColValues:[],
skewedColValueLocationMaps:{}), storedAsSubDirectories:false), parameters:{transient_lastDdlTime=1458083053})
Time taken: 0.369 seconds, Fetched: 38 row(s)
多了个Detailed Partition Information,最初使用这条命令的初衷,是查找分区对应的location,使用这条命令可以找到
1.show partitions xxx
hive> show partitions xxx;
OK
day=20150908
day=20151020
day=20151021
day=20151022
...
day=20160318
Time taken: 0.139 seconds, Fetched: 144 row(s)
由此可见上述命令显示了基本的分区情况
2.desc xxx partition(day=20160315
hive> desc xxx partition(day=20160315);
OK
list_time string
cookie string
device_id string
os string
device_brand string
search_id string
search_guid string
...
filter string
day string
# Partition Information
# col_name data_type comment
day string
Time taken: 0.359 seconds, Fetched: 36 row(s)
此命令显示了表结构与partition information
3.
hive> desc extended ods_search_log_app partition(day=20160315);
OK
list_time string
cookie string
device_id string
os string
device_brand string
search_id string
search_guid string
...
coupon string
filter string
day string
# Partition Information
# col_name data_type comment
day string
Detailed Partition Information Partition(values:[20160315], dbName:xxx, tableName:xxx, ............. location:hdfs://mycluster/data/hive/warehouse/xxx/xxx/day=20160315, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat,
compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[], parameters:{}, skewedInfo:SkewedInfo(skewedColNames:[], skewedColValues:[],
skewedColValueLocationMaps:{}), storedAsSubDirectories:false), parameters:{transient_lastDdlTime=1458083053})
Time taken: 0.369 seconds, Fetched: 38 row(s)
多了个Detailed Partition Information,最初使用这条命令的初衷,是查找分区对应的location,使用这条命令可以找到
相关文章推荐
- NLP工具
- 2016年3月19日 培训复习
- 网易互娱2017实习生招聘在线笔试第一场-1电子数字
- 最大流问题 浅析
- Linux Socket 网络编程
- JAVA大数类练手
- 关于个人项目的总结,最主要是不足
- IOS学习 Block语法的使用:声明、创建、引用局部变量
- 欢迎大家收听喜马拉雅,我的主播频道http://m.ximalaya.com/weizhubo/44966139
- 【STM32】HardFault_Handler问题解决的一种办法
- linux学习一天一个命令(20)[w命令]
- Android Studio 报错:Default activity not found
- 利用委托加观察者模式实现老板状态变化通知C++
- 【leetcode】Array——Find Peak Element(162)
- hdu2825(AC自动机+状态压缩dp)
- Bootstrap之表单控件状态
- rpm和yum的使用,程序包编译安装以及编译apache过程中出现的问题
- 如何取出Map的key和value值
- Android WebView中Header与Cookie应用场景深入剖析
- 压缩感知重构算法之CoSaMP算法python实现