- 创建外部表wwwlogs(...)分区(logdate string,nodeip string,tag string)...
- alter table wwwlogs add partition(logdate ='2013-01-21',nodeip ='192.168.1.101',tag ='error');
- alter table wwwlogs add partition(logdate ='2013-01-20',nodeip ='192.168.1.102',tag ='access');
- 添加其他分区。
醇>
问题是:
1. show partitions wwwlogs partition(logdate ='2013-01-21')将列出所有分区。
2.从wwwlogs中选择count(1),其中logdate ='2013-01-21'和tag ='error':
Stage-1的Hadoop作业信息:映射器数量:0;减速机数量:1
由于映射器的数量为0,因此选择结果为0.