Wrong localScheme in DailySuffix source, which makes it cannot be used in local test.
The bug can be reproduced by the following import com.twitter.scalding._ import com.twitter.scalding.source._ implicit val tz = DateOps.UTC implicit val parser = DateParser.default val d1 = RichDate("2014-05-01") val d2 = RichDate("2014-05-02") val dr = DateRange(d1, d2) val src = DailySuffixTsv("input0")(dr) src. localScheme
Clarification: the above doesn't reproduce the issue. src.localScheme is the issue, and it is only an issue thus far in the context of local mode stuff.
I FINALLY FIXED THIS. patch incoming.
Sweet! Thanks!
On Tue, Jun 24, 2014 at 7:19 PM, P. Oscar Boykin [email protected] wrote:
Closed #874 https://github.com/twitter/scalding/issues/874 via #910 https://github.com/twitter/scalding/pull/910.
— Reply to this email directly or view it on GitHub https://github.com/twitter/scalding/issues/874#event-134840431.
Kevin Lin | Twitter, Inc. 1355 Market St. | San Francisco, CA | 94103
Follow me: @reconditesea https://twitter.com/reconditesea
I think this patch only solves the problem in Typed API. Using DailySuffix source in Fields API in local mode breaks with exception,
> Caused by: "java.io.FileNotFoundException: inputPath/%1$tY/%1$tm/%1$td/* (No such file or directory)".
I believe this is due to this line.
First I was thinking maybe this can be solved by formatting localPath properly using dateRange.start.
override def localPath = Globifier(pattern)(tz).globify(dateRange).head
However, it still will break because of all files /*, localMode expects actual file name.
I am not sure how this can be solved.
Good call @morazow, I will try and fix this.