aboutsummaryrefslogtreecommitdiffstats
path: root/scalding/src/test
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@archive.org>2018-06-08 15:06:39 -0700
committerBryan Newbold <bnewbold@archive.org>2018-06-08 16:21:01 -0700
commit82e24b8de7776e355a15afb5f442356bc4ad2d81 (patch)
tree5f86ec4cda158361f8903262ce23c715fd979db3 /scalding/src/test
parent410c48faf2099de74292e8583fcd2524d6fd1b7c (diff)
downloadsandcrawler-bnewbold-args.tar.gz
sandcrawler-bnewbold-args.zip
make hbase_table and zookeeper_hosts CLI argsbnewbold-args
Diffstat (limited to 'scalding/src/test')
-rw-r--r--scalding/src/test/scala/sandcrawler/HBaseMimeCountTest.scala5
-rw-r--r--scalding/src/test/scala/sandcrawler/HBaseRowCountTest.scala5
2 files changed, 8 insertions, 2 deletions
diff --git a/scalding/src/test/scala/sandcrawler/HBaseMimeCountTest.scala b/scalding/src/test/scala/sandcrawler/HBaseMimeCountTest.scala
index eb6f4ff..dfcfcdb 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](HBaseMimeCountJob.getHBaseSource,
+ .source[Tuple](HBaseMimeCountJob.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/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 =>