aboutsummaryrefslogtreecommitdiffstats
path: root/scalding
diff options
context:
space:
mode:
authorEllen Spertus <ellen.spertus@gmail.com>2018-06-03 16:54:08 -0700
committerEllen Spertus <ellen.spertus@gmail.com>2018-06-03 16:54:08 -0700
commita9fe176a305b474050727d80c1f42941ecf1a2dc (patch)
tree0f2596b134c169d69742b12d3c1defe6949b231b /scalding
parent5da6d85175992fae019e1d4d1ebeb4accfec1820 (diff)
downloadsandcrawler-a9fe176a305b474050727d80c1f42941ecf1a2dc.tar.gz
sandcrawler-a9fe176a305b474050727d80c1f42941ecf1a2dc.zip
Added HBaseBuilder.build() and had HBaseRowCountJob call it.
Diffstat (limited to 'scalding')
-rw-r--r--scalding/src/main/scala/sandcrawler/HBaseBuilder.scala6
-rw-r--r--scalding/src/main/scala/sandcrawler/HBaseRowCountJob.scala10
2 files changed, 5 insertions, 11 deletions
diff --git a/scalding/src/main/scala/sandcrawler/HBaseBuilder.scala b/scalding/src/main/scala/sandcrawler/HBaseBuilder.scala
index c55aef6..35aeb46 100644
--- a/scalding/src/main/scala/sandcrawler/HBaseBuilder.scala
+++ b/scalding/src/main/scala/sandcrawler/HBaseBuilder.scala
@@ -40,10 +40,8 @@ object HBaseBuilder {
(families, groupedColNames.map({fields => new Fields(fields : _*)}))
}
- /*
- def build(table: String, server: String, colSpec: List[String], sourceMode: SourceMode, keyList: List[String]) {
- val (families: List[String], fields: List[Fields]) = parseColSpec(colSpec)
+ def build(table: String, server: String, colSpec: List[String], sourceMode: SourceMode, keyList: List[String] = List("key")) = {
+ val (families, fields) = parseColSpec(colSpec)
new HBaseSource(table, server, new Fields("key"), families, fields, sourceMode = sourceMode, keyList = keyList)
}
- */
}
diff --git a/scalding/src/main/scala/sandcrawler/HBaseRowCountJob.scala b/scalding/src/main/scala/sandcrawler/HBaseRowCountJob.scala
index 79ebbb1..9d074ab 100644
--- a/scalding/src/main/scala/sandcrawler/HBaseRowCountJob.scala
+++ b/scalding/src/main/scala/sandcrawler/HBaseRowCountJob.scala
@@ -24,13 +24,9 @@ class HBaseRowCountJob(args: Args) extends JobBase(args) with HBasePipeConversio
}
object HBaseRowCountJob {
- def getHBaseSource = new HBaseSource(
- //"table_name",
- //"quorum_name:2181",
+ 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?)
- new Fields("key"),
- List("file"),
- List(new Fields("size", "mimetype")),
- sourceMode = SourceMode.SCAN_ALL)
+ List("file:size", "file:mime"),
+ SourceMode.SCAN_ALL)
}