diff options
Diffstat (limited to 'scalding')
-rw-r--r-- | scalding/src/main/scala/sandcrawler/HBaseBuilder.scala | 6 | ||||
-rw-r--r-- | scalding/src/main/scala/sandcrawler/HBaseRowCountJob.scala | 10 |
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) } |