aboutsummaryrefslogtreecommitdiffstats
path: root/scalding/src/main/scala/sandcrawler/Scorable.scala
diff options
context:
space:
mode:
authorEllen Spertus <ellen.spertus@gmail.com>2018-08-09 20:26:31 -0700
committerEllen Spertus <ellen.spertus@gmail.com>2018-08-09 20:26:31 -0700
commit28c0518379d226ac25597c2840c5c81bd8551487 (patch)
tree3414260a4e7f02cf6142f84484a62460ab3c2753 /scalding/src/main/scala/sandcrawler/Scorable.scala
parent818ad070626d6af7c490017e0bd9b53f30f20150 (diff)
downloadsandcrawler-28c0518379d226ac25597c2840c5c81bd8551487.tar.gz
sandcrawler-28c0518379d226ac25597c2840c5c81bd8551487.zip
WIP
Diffstat (limited to 'scalding/src/main/scala/sandcrawler/Scorable.scala')
-rw-r--r--scalding/src/main/scala/sandcrawler/Scorable.scala9
1 files changed, 5 insertions, 4 deletions
diff --git a/scalding/src/main/scala/sandcrawler/Scorable.scala b/scalding/src/main/scala/sandcrawler/Scorable.scala
index 2d2345b..92b61bc 100644
--- a/scalding/src/main/scala/sandcrawler/Scorable.scala
+++ b/scalding/src/main/scala/sandcrawler/Scorable.scala
@@ -12,9 +12,9 @@ case class ReduceFeatures(json : String)
case class ReduceOutput(val slug : String, score : Int, json1 : String, json2 : String)
abstract class Scorable {
- def getInputPipe(args : Args) : TypedPipe[(String, ReduceFeatures)] =
+ def getInputPipe(pipe : Pipe) : TypedPipe[(String, ReduceFeatures)] =
{
- getFeaturesPipe(args)
+ getFeaturesPipe(pipe)
.filter { entry => Scorable.isValidSlug(entry.slug) }
.groupBy { case MapFeatures(slug, json) => slug }
.map { tuple =>
@@ -23,8 +23,9 @@ abstract class Scorable {
}
}
- // abstract method
- def getFeaturesPipe(args : Args) : TypedPipe[MapFeatures]
+ // abstract methods
+ def getSource(args : Args) : Source
+ def getFeaturesPipe(pipe : Pipe) : TypedPipe[MapFeatures]
}
object Scorable {