lmt = limit data 10;
只获取指定条数的数据,不能保证每次得到的结果一致,先执行order再limit可以保证一致。
输入数据全部载入。
会触发reduce阶段
a = load 'a.txt'; b = group a all; c = foreach b generate COUNT(a) as sum; d = order a by $0; e = limit d c.sum/100;
lmt = limit data 10;
a = load 'a.txt'; b = group a all; c = foreach b generate COUNT(a) as sum; d = order a by $0; e = limit d c.sum/100;