ログってなんぼ

日々のメモです

TreasureData:あらかじめ用意しておいたファイルを読み込んでQueryを実行

$ cat query.q
select v['path'],count(1) as cnt from kndl group by v['path'] order by cnt desc limit 10

実行

$ td query -w -d test -q ./query.q
.
.
.
  2013-09-26 12:04:27,598 Stage-2 map = 100%,  reduce = 100%, Cumulative CPU 6.56 sec
  2013-09-26 12:04:28,608 Stage-2 map = 100%,  reduce = 100%, Cumulative CPU 6.56 sec
  MapReduce Total cumulative CPU time: 6 seconds 560 msec
  Ended Job = job_201306191947_181862
  finished at 2013-09-26T12:04:30Z
  MapReduce Jobs Launched:
  Job 0: Map: 1  Reduce: 4   Cumulative CPU: 38.31 sec   HDFS Read: 301665 HDFS Write: 852110 SUCCESS
  Job 1: Map: 1  Reduce: 1   Cumulative CPU: 6.56 sec   HDFS Read: 853223 HDFS Write: 487 SUCCESS
  Total MapReduce CPU Time Spent: 44 seconds 870 msec
  OK
  MapReduce time taken: 109.146 seconds
  Time taken: 109.306 seconds
Status     : success
Result     :
+-------------------------------+------+
| _c0                           | cnt  |
+-------------------------------+------+
| /robots.txt                   | 2582 |
| /                             | 583  |
| /items/newrelease/2275256051/ | 288  |
| /items/detail/B00E9IYWJ4      | 244  |
| /items/topseller/2293263051   | 194  |
| /items/topseller/2275256051   | 193  |
| /items/topseller/2292480051   | 190  |
| /items/search/s/2292095051/1/ | 190  |
| /items/topseller/2291657051   | 183  |
| /items/topseller/2291568051   | 182  |
+-------------------------------+------+