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/HBaseColCountJob.scala (renamed from scalding/src/main/scala/sandcrawler/GrobidMetadataCountJob.scala)13
1 files changed, 7 insertions, 6 deletions
diff --git a/scalding/src/main/scala/sandcrawler/GrobidMetadataCountJob.scala b/scalding/src/main/scala/sandcrawler/HBaseColCountJob.scala
index 08f3340..a007339 100644
--- a/scalding/src/main/scala/sandcrawler/GrobidMetadataCountJob.scala
+++ b/scalding/src/main/scala/sandcrawler/HBaseColCountJob.scala
@@ -10,27 +10,28 @@ import parallelai.spyglass.hbase.HBaseConstants.SourceMode
import parallelai.spyglass.hbase.HBasePipeConversions
import parallelai.spyglass.hbase.HBaseSource
-class GrobidMetadataCountJob(args: Args) extends JobBase(args) with HBasePipeConversions {
+class HBaseColCountJob(args: Args) extends JobBase(args) with HBasePipeConversions {
val output = args("output")
- GrobidMetadataCountJob.getHBaseSource(
+ HBaseColCountJob.getHBaseSource(
args("hbase-table"),
- args("zookeeper-hosts"))
+ args("zookeeper-hosts"),
+ args("column")
.read
.debug
.groupAll { _.size('count) }
.write(Tsv(output))
}
-object GrobidMetadataCountJob {
+object HBaseColCountJob {
// eg, "wbgrp-journal-extract-0-qa",7 "mtrcs-zk1.us.archive.org:2181"
- def getHBaseSource(hbaseTable: String, zookeeperHosts: String) : HBaseSource = {
+ def getHBaseSource(hbaseTable: String, zookeeperHosts: String, col: String) : HBaseSource = {
HBaseBuilder.build(
hbaseTable,
zookeeperHosts,
- List("grobid0:metadata"),
+ List(col),
SourceMode.SCAN_ALL)
}
}