aboutsummaryrefslogtreecommitdiffstats
path: root/scalding/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'scalding/src/main')
-rw-r--r--scalding/src/main/scala/sandcrawler/HBaseRowCountJob.scala14
1 files changed, 9 insertions, 5 deletions
diff --git a/scalding/src/main/scala/sandcrawler/HBaseRowCountJob.scala b/scalding/src/main/scala/sandcrawler/HBaseRowCountJob.scala
index d47fe60..79ebbb1 100644
--- a/scalding/src/main/scala/sandcrawler/HBaseRowCountJob.scala
+++ b/scalding/src/main/scala/sandcrawler/HBaseRowCountJob.scala
@@ -16,7 +16,15 @@ class HBaseRowCountJob(args: Args) extends JobBase(args) with HBasePipeConversio
val output = args("output")
- val hbs = new HBaseSource(
+ HBaseRowCountJob.getHBaseSource
+ .read
+ .debug
+ .groupAll { _.size('count) }
+ .write(Tsv(output))
+}
+
+object HBaseRowCountJob {
+ def getHBaseSource = new HBaseSource(
//"table_name",
//"quorum_name:2181",
"wbgrp-journal-extract-0-qa", // HBase Table Name
@@ -25,8 +33,4 @@ class HBaseRowCountJob(args: Args) extends JobBase(args) with HBasePipeConversio
List("file"),
List(new Fields("size", "mimetype")),
sourceMode = SourceMode.SCAN_ALL)
- .read
- .debug
- .groupAll { _.size('count) }
- .write(Tsv(output))
}