scalding icon indicating copy to clipboard operation
scalding copied to clipboard

Wrong localScheme in DailySuffix source, which makes it cannot be used in local test.

Open reconditesea opened this issue 12 years ago • 5 comments

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

reconditesea avatar May 15 '14 00:05 reconditesea

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.

jcoveney avatar May 15 '14 03:05 jcoveney

I FINALLY FIXED THIS. patch incoming.

jcoveney avatar Jun 25 '14 01:06 jcoveney

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

reconditesea avatar Jun 25 '14 02:06 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.

morazow avatar Jun 25 '14 13:06 morazow

Good call @morazow, I will try and fix this.

jcoveney avatar Jun 25 '14 20:06 jcoveney