aboutsummaryrefslogtreecommitdiffstats
path: root/scalding/src/test/scala
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@archive.org>2018-06-17 10:00:28 -0700
committerBryan Newbold <bnewbold@archive.org>2018-06-17 10:00:28 -0700
commit2a2921d82a5a46549e9be2c2eb5703ce28fa7579 (patch)
tree1cf775d36e590889128942711208e4b37022e73d /scalding/src/test/scala
parent8cc18540e2663ab02428c15c2e1f17fe5624e1aa (diff)
downloadsandcrawler-2a2921d82a5a46549e9be2c2eb5703ce28fa7579.tar.gz
sandcrawler-2a2921d82a5a46549e9be2c2eb5703ce28fa7579.zip
hbase table and zk host as arguments
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..fcd9087 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 (test_table, test_host) = ("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", test_table)
+ .arg("zookeeper-hosts", test_host)
.arg("debug", "true")
- .source[Tuple](HBaseCountJob.getHBaseSource("file:mime"),
+ .source[Tuple](HBaseCountJob.getHBaseSource(test_table, test_host, "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..a5c35a2 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 (test_table, test_host) = ("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", test_table)
+ .arg("zookeeper-hosts", test_host)
.arg("debug", "true")
- .source[Tuple](HBaseRowCountJob.getHBaseSource,
+ .source[Tuple](HBaseRowCountJob.getHBaseSource(test_table, test_host),
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 a0b313e..1877d6f 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 (test_table, test_host) = ("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", test_table)
+ .arg("zookeeper-hosts", test_host)
.arg("debug", "true")
- .source[Tuple](HBaseCountJob.getHBaseSource("grobid0:status"),
+ .source[Tuple](HBaseCountJob.getHBaseSource(test_table, test_host, "grobid0:status"),
sampleData.map(l => new Tuple(l.map(s => {new ImmutableBytesWritable(Bytes.toBytes(s))}):_*)))
.sink[Tuple](Tsv(output)) {
outputBuffer =>