diff options
author | Bryan Newbold <bnewbold@archive.org> | 2018-07-13 18:42:33 -0400 |
---|---|---|
committer | Bryan Newbold <bnewbold@archive.org> | 2018-07-13 18:42:33 -0400 |
commit | f955fef045d3c78e351a639546a27ab0a53fc0aa (patch) | |
tree | 5d25aa7e44d8bc196ac20f2e3a187bd0798ce134 /scalding/src/main/scala/sandcrawler/HBaseRowCountJob.scala | |
parent | 0e74b5f49950c5c46d9be5e99066bee71cc8828f (diff) | |
parent | 071f4ff633eaa2669c4afcfc421f95cdc0a6765f (diff) | |
download | sandcrawler-f955fef045d3c78e351a639546a27ab0a53fc0aa.tar.gz sandcrawler-f955fef045d3c78e351a639546a27ab0a53fc0aa.zip |
Merge branch 'bnewbold-args'
Diffstat (limited to 'scalding/src/main/scala/sandcrawler/HBaseRowCountJob.scala')
-rw-r--r-- | scalding/src/main/scala/sandcrawler/HBaseRowCountJob.scala | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/scalding/src/main/scala/sandcrawler/HBaseRowCountJob.scala b/scalding/src/main/scala/sandcrawler/HBaseRowCountJob.scala index 0c8e615..334b7a6 100644 --- a/scalding/src/main/scala/sandcrawler/HBaseRowCountJob.scala +++ b/scalding/src/main/scala/sandcrawler/HBaseRowCountJob.scala @@ -10,12 +10,10 @@ import parallelai.spyglass.hbase.HBaseConstants.SourceMode class HBaseRowCountJob(args: Args) extends JobBase(args) with HBasePipeConversions { - - // For now doesn't actually count, just dumps a "word count" - val output = args("output") - HBaseRowCountJob.getHBaseSource + HBaseRowCountJob.getHBaseSource(args("hbase-table"), + args("zookeeper-hosts")) .read .debug .groupAll { _.size('count) } @@ -23,9 +21,14 @@ class HBaseRowCountJob(args: Args) extends JobBase(args) with HBasePipeConversio } object HBaseRowCountJob { - def getHBaseSource = HBaseBuilder.build( - "wbgrp-journal-extract-0-qa", // HBase Table Name - "mtrcs-zk1.us.archive.org:2181", // HBase Zookeeper server (to get runtime config info; can be array?) - List("file:size", "file:mime"), - SourceMode.SCAN_ALL) + + // eg, "wbgrp-journal-extract-0-qa", "mtrcs-zk1.us.archive.org:2181" + def getHBaseSource(hbaseTable: String, zookeeperHosts: String) : HBaseSource = { + return HBaseBuilder.build( + hbaseTable, + zookeeperHosts, + List("file:size"), + SourceMode.SCAN_ALL) + } + } |