aboutsummaryrefslogtreecommitdiffstats
path: root/scalding/src/test/scala
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@archive.org>2018-07-13 18:42:33 -0400
committerBryan Newbold <bnewbold@archive.org>2018-07-13 18:42:33 -0400
commitf955fef045d3c78e351a639546a27ab0a53fc0aa (patch)
tree5d25aa7e44d8bc196ac20f2e3a187bd0798ce134 /scalding/src/test/scala
parent0e74b5f49950c5c46d9be5e99066bee71cc8828f (diff)
parent071f4ff633eaa2669c4afcfc421f95cdc0a6765f (diff)
downloadsandcrawler-f955fef045d3c78e351a639546a27ab0a53fc0aa.tar.gz
sandcrawler-f955fef045d3c78e351a639546a27ab0a53fc0aa.zip
Merge branch 'bnewbold-args'
Diffstat (limited to 'scalding/src/test/scala')
-rw-r--r--scalding/src/test/scala/sandcrawler/HBaseMimeCountTest.scala5
-rw-r--r--scalding/src/test/scala/sandcrawler/HBaseRowCountTest.scala5
-rw-r--r--scalding/src/test/scala/sandcrawler/HBaseStatusCountTest.scala5
3 files changed, 12 insertions, 3 deletions
diff --git a/scalding/src/test/scala/sandcrawler/HBaseMimeCountTest.scala b/scalding/src/test/scala/sandcrawler/HBaseMimeCountTest.scala
index cc400c5..fde2290 100644
--- a/scalding/src/test/scala/sandcrawler/HBaseMimeCountTest.scala
+++ b/scalding/src/test/scala/sandcrawler/HBaseMimeCountTest.scala
@@ -16,6 +16,7 @@ import scala._
class HBaseMimeCountTest extends FunSpec with TupleConversions {
val output = "/tmp/testOutput"
+ val (testTable, testHost) = ("test-table", "dummy-host:2181")
val log = LoggerFactory.getLogger(this.getClass.getName)
@@ -40,8 +41,10 @@ class HBaseMimeCountTest extends FunSpec with TupleConversions {
.arg("test", "")
.arg("app.conf.path", "app.conf")
.arg("output", output)
+ .arg("hbase-table", testTable)
+ .arg("zookeeper-hosts", testHost)
.arg("debug", "true")
- .source[Tuple](HBaseCountJob.getHBaseSource("file:mime"),
+ .source[Tuple](HBaseCountJob.getHBaseSource(testTable, testHost, "file:mime"),
sampleData.map(l => new Tuple(l.map(s => {new ImmutableBytesWritable(Bytes.toBytes(s))}):_*)))
.sink[Tuple](Tsv(output)) {
outputBuffer =>
diff --git a/scalding/src/test/scala/sandcrawler/HBaseRowCountTest.scala b/scalding/src/test/scala/sandcrawler/HBaseRowCountTest.scala
index 6f61eb3..3424a36 100644
--- a/scalding/src/test/scala/sandcrawler/HBaseRowCountTest.scala
+++ b/scalding/src/test/scala/sandcrawler/HBaseRowCountTest.scala
@@ -19,6 +19,7 @@ import scala._
class HBaseRowCountTest extends FunSpec with TupleConversions {
val output = "/tmp/testOutput"
+ val (testTable, testHost) = ("test-table", "dummy-host:2181")
val log = LoggerFactory.getLogger(this.getClass.getName)
@@ -37,8 +38,10 @@ class HBaseRowCountTest extends FunSpec with TupleConversions {
.arg("test", "")
.arg("app.conf.path", "app.conf")
.arg("output", output)
+ .arg("hbase-table", testTable)
+ .arg("zookeeper-hosts", testHost)
.arg("debug", "true")
- .source[Tuple](HBaseRowCountJob.getHBaseSource,
+ .source[Tuple](HBaseRowCountJob.getHBaseSource(testTable, testHost),
sampleData.map(l => new Tuple(l.map(s => {new ImmutableBytesWritable(Bytes.toBytes(s))}):_*)))
.sink[Tuple](Tsv(output)) {
outputBuffer =>
diff --git a/scalding/src/test/scala/sandcrawler/HBaseStatusCountTest.scala b/scalding/src/test/scala/sandcrawler/HBaseStatusCountTest.scala
index 056347c..fca9c69 100644
--- a/scalding/src/test/scala/sandcrawler/HBaseStatusCountTest.scala
+++ b/scalding/src/test/scala/sandcrawler/HBaseStatusCountTest.scala
@@ -16,6 +16,7 @@ import scala._
class HBaseStatusCountTest extends FunSpec with TupleConversions {
val output = "/tmp/testOutput"
+ val (testTable, testHost) = ("test-table", "dummy-host:2181")
val log = LoggerFactory.getLogger(this.getClass.getName)
@@ -40,8 +41,10 @@ class HBaseStatusCountTest extends FunSpec with TupleConversions {
.arg("test", "")
.arg("app.conf.path", "app.conf")
.arg("output", output)
+ .arg("hbase-table", testTable)
+ .arg("zookeeper-hosts", testHost)
.arg("debug", "true")
- .source[Tuple](HBaseCountJob.getHBaseSource("grobid0:status_code"),
+ .source[Tuple](HBaseCountJob.getHBaseSource(testTable, testHost, "grobid0:status_code"),
sampleData.map(l => new Tuple(l.map(s => {new ImmutableBytesWritable(Bytes.toBytes(s))}):_*)))
.sink[Tuple](Tsv(output)) {
outputBuffer =>