Updated Branches: refs/heads/master 4406ded02 -> 234b51aa2
CRUNCH-334: Expose new Avro generic methods in Scrunch APIs. Contributed by Magnus Runesson. Project: http://git-wip-us.apache.org/repos/asf/crunch/repo Commit: http://git-wip-us.apache.org/repos/asf/crunch/commit/234b51aa Tree: http://git-wip-us.apache.org/repos/asf/crunch/tree/234b51aa Diff: http://git-wip-us.apache.org/repos/asf/crunch/diff/234b51aa Branch: refs/heads/master Commit: 234b51aa25de7f543a17c5b79b7d9fa1ae89e225 Parents: 4406ded Author: Josh Wills <[email protected]> Authored: Tue Jan 28 05:44:19 2014 -0800 Committer: Josh Wills <[email protected]> Committed: Tue Jan 28 06:26:18 2014 -0800 ---------------------------------------------------------------------- .../src/main/scala/org/apache/crunch/scrunch/IO.scala | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/crunch/blob/234b51aa/crunch-scrunch/src/main/scala/org/apache/crunch/scrunch/IO.scala ---------------------------------------------------------------------- diff --git a/crunch-scrunch/src/main/scala/org/apache/crunch/scrunch/IO.scala b/crunch-scrunch/src/main/scala/org/apache/crunch/scrunch/IO.scala index 89b331b..99b10e9 100644 --- a/crunch-scrunch/src/main/scala/org/apache/crunch/scrunch/IO.scala +++ b/crunch-scrunch/src/main/scala/org/apache/crunch/scrunch/IO.scala @@ -19,11 +19,14 @@ package org.apache.crunch.scrunch import org.apache.crunch.io.{From => from, To => to, At => at} import org.apache.crunch.types.avro.AvroType -import org.apache.hadoop.fs.Path; +import org.apache.hadoop.conf.Configuration +import org.apache.hadoop.fs.Path trait From { def avroFile[T](path: String, atype: AvroType[T]) = from.avroFile(path, atype) def avroFile[T](path: Path, atype: AvroType[T]) = from.avroFile(path, atype) + def avroFile(path: Path) = from.avroFile(path) + def avroFile(path: Path, conf: Configuration) = from.avroFile(path, conf) def textFile(path: String) = from.textFile(path) def textFile(path: Path) = from.textFile(path) } @@ -42,6 +45,8 @@ object To extends To trait At { def avroFile[T](path: String, atype: AvroType[T]) = at.avroFile(path, atype) def avroFile[T](path: Path, atype: AvroType[T]) = at.avroFile(path, atype) + def avroFile(path: Path) = at.avroFile(path) + def avroFile(path: Path, conf: Configuration) = at.avroFile(path, conf) def textFile(path: String) = at.textFile(path) def textFile(path: Path) = at.textFile(path) }
