Re: [問題] 透過R使用Rhdfs package讀取超大CSV檔

作者: Wush978 (拒看低質媒體)   2014-08-28 00:33:45
最近自己在玩hadoop-2.2.0的hdfs,
發現已經有C client。
試了一下,發現可以用Rcpp簡單包到R中。
我自己測試的讀取效能約50MB/s (可能和網路有關),
和command line的hadoop差不多。
※ 引述《dppman (*^o^*)》之銘言:
: ※ 引述《Wush978 (拒看低質媒體)》之銘言:
: : 建議你先測量一下throughput
: : ```r
: : start.time <- Sys.time()
: : repeat {
: : m = hdfs.read(f)
: : duration <- as.numeric(difftime(Sys.time(), start.time, unit = "secs"))
: : print(length(m) / duration) # 每秒的bytes數
: : start.time <- Sys.time()
: : }
: : ```
: : 先看一下hdfs.read的效能,如果throughput是1MB / s的速度的話
: : 20G 需要 20*2^30 / 2^20 秒,大約是5.6小時
: :

Links booklink

Contact Us: admin [ a t ] ucptt.com