Closed Smarker closed 6 years ago
Resolved this one in project-fortis-mono.
commit 75c68e006d3f855418b52835c5ef5a16b6edb261
Author: Clemens Wolff <clewolff@microsoft.com>
Date: Fri Dec 8 10:44:37 2017 -0500
Standardize casing of Twitter pipelinekey
See: https://github.com/CatalystCode/project-fortis-pipeline/issues/245
diff --git a/project-fortis-spark/src/main/scala/com/microsoft/partnercatalyst/fortis/spark/CassandraTest.scala b/project-fortis-spark/src/main/scala/com/microsoft/partnercatalyst/fortis/spark/CassandraTest.scala
index 3f02f2c..e4cdef0 100644
--- a/project-fortis-spark/src/main/scala/com/microsoft/partnercatalyst/fortis/spark/CassandraTest.scala
+++ b/project-fortis-spark/src/main/scala/com/microsoft/partnercatalyst/fortis/spark/CassandraTest.scala
@@ -66,7 +66,7 @@ object CassandraTest {
eventid = "235",
sourceeventid = "original-235",
sourceurl = "http://cnn.com",
- pipelinekey = "twitter",
+ pipelinekey = "Twitter",
sharedLocations = List(),
externalsourceid = "cnn",
body = "test message a new change",
@@ -90,7 +90,7 @@ object CassandraTest {
eventid = "434",
sourceeventid = "original-434",
sourceurl = "http://bbc.com",
- pipelinekey = "twitter",
+ pipelinekey = "Twitter",
sharedLocations = List(),
externalsourceid = "bbc",
body = "This is a another test message",
@@ -117,7 +117,7 @@ object CassandraTest {
eventid = "435",
sourceeventid = "original-435",
sourceurl = "http://bloomberg.com",
- pipelinekey = "twitter",
+ pipelinekey = "Twitter",
sharedLocations = List(),
externalsourceid = "bloomberg",
body = "This is a another test message from bloomberg",
diff --git a/project-fortis-spark/src/test/scala/com/microsoft/partnercatalyst/fortis/spark/analyzer/timeseries/ComputedTilesToHatmapTrendsSpec.scala b/project-fortis-spark/src/test/scala/com/microsoft/partnercatalyst/fortis/spark/analyzer/timeseries/ComputedTilesToHatmapTrendsSpec.scala
index a7156ef..433ed76 100644
--- a/project-fortis-spark/src/test/scala/com/microsoft/partnercatalyst/fortis/spark/analyzer/timeseries/ComputedTilesToHatmapTrendsSpec.scala
+++ b/project-fortis-spark/src/test/scala/com/microsoft/partnercatalyst/fortis/spark/analyzer/timeseries/ComputedTilesToHatmapTrendsSpec.scala
@@ -22,14 +22,14 @@ class ComputedTilesToHatmapTrendsSpec extends FlatSpec with BeforeAndAfter {
it should "result in positive score for a positive trend" in {
val tiles = Seq(
- ComputedTile(2010, 0, PeriodType.Year.periodTypeName, "2010", "twitter", 8, 1, 2, "HamillHimself", 100, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
- ComputedTile(2011, 0, PeriodType.Year.periodTypeName, "2011", "twitter", 8, 1, 2, "HamillHimself", 200, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
- ComputedTile(2012, 0, PeriodType.Year.periodTypeName, "2012", "twitter", 8, 1, 2, "HamillHimself", 300, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
- ComputedTile(2013, 0, PeriodType.Year.periodTypeName, "2013", "twitter", 8, 1, 2, "HamillHimself", 400, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
- ComputedTile(2014, 0, PeriodType.Year.periodTypeName, "2014", "twitter", 8, 1, 2, "HamillHimself", 500, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
- ComputedTile(2015, 0, PeriodType.Year.periodTypeName, "2015", "twitter", 8, 1, 2, "HamillHimself", 600, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
- ComputedTile(2016, 0, PeriodType.Year.periodTypeName, "2016", "twitter", 8, 1, 2, "HamillHimself", 700, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
- ComputedTile(2017, 0, PeriodType.Year.periodTypeName, "2017", "twitter", 8, 1, 2, "HamillHimself", 800, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None))
+ ComputedTile(2010, 0, PeriodType.Year.periodTypeName, "2010", "Twitter", 8, 1, 2, "HamillHimself", 100, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
+ ComputedTile(2011, 0, PeriodType.Year.periodTypeName, "2011", "Twitter", 8, 1, 2, "HamillHimself", 200, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
+ ComputedTile(2012, 0, PeriodType.Year.periodTypeName, "2012", "Twitter", 8, 1, 2, "HamillHimself", 300, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
+ ComputedTile(2013, 0, PeriodType.Year.periodTypeName, "2013", "Twitter", 8, 1, 2, "HamillHimself", 400, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
+ ComputedTile(2014, 0, PeriodType.Year.periodTypeName, "2014", "Twitter", 8, 1, 2, "HamillHimself", 500, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
+ ComputedTile(2015, 0, PeriodType.Year.periodTypeName, "2015", "Twitter", 8, 1, 2, "HamillHimself", 600, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
+ ComputedTile(2016, 0, PeriodType.Year.periodTypeName, "2016", "Twitter", 8, 1, 2, "HamillHimself", 700, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
+ ComputedTile(2017, 0, PeriodType.Year.periodTypeName, "2017", "Twitter", 8, 1, 2, "HamillHimself", 800, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None))
)
val trends = ComputedTilesToComputedTrends(sc.makeRDD(tiles)).collect()
assert(trends.length == 1)
@@ -38,14 +38,14 @@ class ComputedTilesToHatmapTrendsSpec extends FlatSpec with BeforeAndAfter {
it should "result in negative score for a downward trend" in {
val tiles = Seq(
- ComputedTile(2010, 0, PeriodType.Year.periodTypeName, "2010", "twitter", 8, 1, 2, "HamillHimself", 100, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
- ComputedTile(2011, 0, PeriodType.Year.periodTypeName, "2011", "twitter", 8, 1, 2, "HamillHimself", 90, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
- ComputedTile(2012, 0, PeriodType.Year.periodTypeName, "2012", "twitter", 8, 1, 2, "HamillHimself", 80, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
- ComputedTile(2013, 0, PeriodType.Year.periodTypeName, "2013", "twitter", 8, 1, 2, "HamillHimself", 70, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
- ComputedTile(2014, 0, PeriodType.Year.periodTypeName, "2014", "twitter", 8, 1, 2, "HamillHimself", 60, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
- ComputedTile(2015, 0, PeriodType.Year.periodTypeName, "2015", "twitter", 8, 1, 2, "HamillHimself", 50, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
- ComputedTile(2016, 0, PeriodType.Year.periodTypeName, "2016", "twitter", 8, 1, 2, "HamillHimself", 40, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
- ComputedTile(2017, 0, PeriodType.Year.periodTypeName, "2017", "twitter", 8, 1, 2, "HamillHimself", 30, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None))
+ ComputedTile(2010, 0, PeriodType.Year.periodTypeName, "2010", "Twitter", 8, 1, 2, "HamillHimself", 100, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
+ ComputedTile(2011, 0, PeriodType.Year.periodTypeName, "2011", "Twitter", 8, 1, 2, "HamillHimself", 90, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
+ ComputedTile(2012, 0, PeriodType.Year.periodTypeName, "2012", "Twitter", 8, 1, 2, "HamillHimself", 80, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
+ ComputedTile(2013, 0, PeriodType.Year.periodTypeName, "2013", "Twitter", 8, 1, 2, "HamillHimself", 70, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
+ ComputedTile(2014, 0, PeriodType.Year.periodTypeName, "2014", "Twitter", 8, 1, 2, "HamillHimself", 60, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
+ ComputedTile(2015, 0, PeriodType.Year.periodTypeName, "2015", "Twitter", 8, 1, 2, "HamillHimself", 50, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
+ ComputedTile(2016, 0, PeriodType.Year.periodTypeName, "2016", "Twitter", 8, 1, 2, "HamillHimself", 40, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
+ ComputedTile(2017, 0, PeriodType.Year.periodTypeName, "2017", "Twitter", 8, 1, 2, "HamillHimself", 30, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None))
)
val trends = ComputedTilesToComputedTrends(sc.makeRDD(tiles)).collect()
assert(trends.length == 1)
@@ -54,14 +54,14 @@ class ComputedTilesToHatmapTrendsSpec extends FlatSpec with BeforeAndAfter {
it should "result in zero score for a flat trend" in {
val tiles = Seq(
- ComputedTile(2010, 0, PeriodType.Year.periodTypeName, "2010", "twitter", 8, 1, 2, "HamillHimself", 100, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
- ComputedTile(2011, 0, PeriodType.Year.periodTypeName, "2011", "twitter", 8, 1, 2, "HamillHimself", 90, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
- ComputedTile(2012, 0, PeriodType.Year.periodTypeName, "2012", "twitter", 8, 1, 2, "HamillHimself", 100, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
- ComputedTile(2013, 0, PeriodType.Year.periodTypeName, "2013", "twitter", 8, 1, 2, "HamillHimself", 90, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
- ComputedTile(2014, 0, PeriodType.Year.periodTypeName, "2014", "twitter", 8, 1, 2, "HamillHimself", 100, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
- ComputedTile(2015, 0, PeriodType.Year.periodTypeName, "2015", "twitter", 8, 1, 2, "HamillHimself", 90, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
- ComputedTile(2016, 0, PeriodType.Year.periodTypeName, "2016", "twitter", 8, 1, 2, "HamillHimself", 100, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
- ComputedTile(2017, 0, PeriodType.Year.periodTypeName, "2017", "twitter", 8, 1, 2, "HamillHimself", 90, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None))
+ ComputedTile(2010, 0, PeriodType.Year.periodTypeName, "2010", "Twitter", 8, 1, 2, "HamillHimself", 100, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
+ ComputedTile(2011, 0, PeriodType.Year.periodTypeName, "2011", "Twitter", 8, 1, 2, "HamillHimself", 90, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
+ ComputedTile(2012, 0, PeriodType.Year.periodTypeName, "2012", "Twitter", 8, 1, 2, "HamillHimself", 100, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
+ ComputedTile(2013, 0, PeriodType.Year.periodTypeName, "2013", "Twitter", 8, 1, 2, "HamillHimself", 90, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
+ ComputedTile(2014, 0, PeriodType.Year.periodTypeName, "2014", "Twitter", 8, 1, 2, "HamillHimself", 100, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
+ ComputedTile(2015, 0, PeriodType.Year.periodTypeName, "2015", "Twitter", 8, 1, 2, "HamillHimself", 90, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
+ ComputedTile(2016, 0, PeriodType.Year.periodTypeName, "2016", "Twitter", 8, 1, 2, "HamillHimself", 100, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
+ ComputedTile(2017, 0, PeriodType.Year.periodTypeName, "2017", "Twitter", 8, 1, 2, "HamillHimself", 90, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None))
)
val trends = ComputedTilesToComputedTrends(sc.makeRDD(tiles)).collect()
assert(trends.length == 1)
@@ -70,32 +70,32 @@ class ComputedTilesToHatmapTrendsSpec extends FlatSpec with BeforeAndAfter {
it should "result in different scores for different topic tuples" in {
val tiles = Seq(
- ComputedTile(2010, 0, PeriodType.Year.periodTypeName, "2010", "twitter", 8, 1, 2, "HamillHimself", 100, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
- ComputedTile(2011, 0, PeriodType.Year.periodTypeName, "2011", "twitter", 8, 1, 2, "HamillHimself", 101, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
- ComputedTile(2012, 0, PeriodType.Year.periodTypeName, "2012", "twitter", 8, 1, 2, "HamillHimself", 200, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
- ComputedTile(2013, 0, PeriodType.Year.periodTypeName, "2013", "twitter", 8, 1, 2, "HamillHimself", 101, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
- ComputedTile(2014, 0, PeriodType.Year.periodTypeName, "2014", "twitter", 8, 1, 2, "HamillHimself", 300, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
- ComputedTile(2015, 0, PeriodType.Year.periodTypeName, "2015", "twitter", 8, 1, 2, "HamillHimself", 101, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
- ComputedTile(2016, 0, PeriodType.Year.periodTypeName, "2016", "twitter", 8, 1, 2, "HamillHimself", 400, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
- ComputedTile(2017, 0, PeriodType.Year.periodTypeName, "2017", "twitter", 8, 1, 2, "HamillHimself", 101, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
-
- ComputedTile(2010, 0, PeriodType.Year.periodTypeName, "2010", "twitter", 8, 1, 2, "HamillHimself", 10, 0, "", Seq(), 0, Tuple3(Some("humanitarian"), None, None)),
- ComputedTile(2011, 0, PeriodType.Year.periodTypeName, "2011", "twitter", 8, 1, 2, "HamillHimself", 20, 0, "", Seq(), 0, Tuple3(Some("humanitarian"), None, None)),
- ComputedTile(2012, 0, PeriodType.Year.periodTypeName, "2012", "twitter", 8, 1, 2, "HamillHimself", 30, 0, "", Seq(), 0, Tuple3(Some("humanitarian"), None, None)),
- ComputedTile(2013, 0, PeriodType.Year.periodTypeName, "2013", "twitter", 8, 1, 2, "HamillHimself", 90, 0, "", Seq(), 0, Tuple3(Some("humanitarian"), None, None)),
- ComputedTile(2014, 0, PeriodType.Year.periodTypeName, "2014", "twitter", 8, 1, 2, "HamillHimself", 91, 0, "", Seq(), 0, Tuple3(Some("humanitarian"), None, None)),
- ComputedTile(2015, 0, PeriodType.Year.periodTypeName, "2015", "twitter", 8, 1, 2, "HamillHimself", 92, 0, "", Seq(), 0, Tuple3(Some("humanitarian"), None, None)),
- ComputedTile(2016, 0, PeriodType.Year.periodTypeName, "2016", "twitter", 8, 1, 2, "HamillHimself", 93, 0, "", Seq(), 0, Tuple3(Some("humanitarian"), None, None)),
- ComputedTile(2017, 0, PeriodType.Year.periodTypeName, "2017", "twitter", 8, 1, 2, "HamillHimself", 94, 0, "", Seq(), 0, Tuple3(Some("humanitarian"), None, None)),
-
- ComputedTile(2010, 0, PeriodType.Year.periodTypeName, "2010", "twitter", 8, 1, 2, "HamillHimself", 10, 0, "", Seq(), 0, Tuple3(Some("syria"), None, None)),
- ComputedTile(2011, 0, PeriodType.Year.periodTypeName, "2011", "twitter", 8, 1, 2, "HamillHimself", 20, 0, "", Seq(), 0, Tuple3(Some("syria"), None, None)),
- ComputedTile(2012, 0, PeriodType.Year.periodTypeName, "2012", "twitter", 8, 1, 2, "HamillHimself", 30, 0, "", Seq(), 0, Tuple3(Some("syria"), None, None)),
- ComputedTile(2013, 0, PeriodType.Year.periodTypeName, "2013", "twitter", 8, 1, 2, "HamillHimself", 20, 0, "", Seq(), 0, Tuple3(Some("syria"), None, None)),
- ComputedTile(2014, 0, PeriodType.Year.periodTypeName, "2014", "twitter", 8, 1, 2, "HamillHimself", 40, 0, "", Seq(), 0, Tuple3(Some("syria"), None, None)),
- ComputedTile(2015, 0, PeriodType.Year.periodTypeName, "2015", "twitter", 8, 1, 2, "HamillHimself", 30, 0, "", Seq(), 0, Tuple3(Some("syria"), None, None)),
- ComputedTile(2016, 0, PeriodType.Year.periodTypeName, "2016", "twitter", 8, 1, 2, "HamillHimself", 40, 0, "", Seq(), 0, Tuple3(Some("syria"), None, None)),
- ComputedTile(2017, 0, PeriodType.Year.periodTypeName, "2017", "twitter", 8, 1, 2, "HamillHimself", 50, 0, "", Seq(), 0, Tuple3(Some("syria"), None, None))
+ ComputedTile(2010, 0, PeriodType.Year.periodTypeName, "2010", "Twitter", 8, 1, 2, "HamillHimself", 100, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
+ ComputedTile(2011, 0, PeriodType.Year.periodTypeName, "2011", "Twitter", 8, 1, 2, "HamillHimself", 101, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
+ ComputedTile(2012, 0, PeriodType.Year.periodTypeName, "2012", "Twitter", 8, 1, 2, "HamillHimself", 200, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
+ ComputedTile(2013, 0, PeriodType.Year.periodTypeName, "2013", "Twitter", 8, 1, 2, "HamillHimself", 101, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
+ ComputedTile(2014, 0, PeriodType.Year.periodTypeName, "2014", "Twitter", 8, 1, 2, "HamillHimself", 300, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
+ ComputedTile(2015, 0, PeriodType.Year.periodTypeName, "2015", "Twitter", 8, 1, 2, "HamillHimself", 101, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
+ ComputedTile(2016, 0, PeriodType.Year.periodTypeName, "2016", "Twitter", 8, 1, 2, "HamillHimself", 400, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
+ ComputedTile(2017, 0, PeriodType.Year.periodTypeName, "2017", "Twitter", 8, 1, 2, "HamillHimself", 101, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
+
+ ComputedTile(2010, 0, PeriodType.Year.periodTypeName, "2010", "Twitter", 8, 1, 2, "HamillHimself", 10, 0, "", Seq(), 0, Tuple3(Some("humanitarian"), None, None)),
+ ComputedTile(2011, 0, PeriodType.Year.periodTypeName, "2011", "Twitter", 8, 1, 2, "HamillHimself", 20, 0, "", Seq(), 0, Tuple3(Some("humanitarian"), None, None)),
+ ComputedTile(2012, 0, PeriodType.Year.periodTypeName, "2012", "Twitter", 8, 1, 2, "HamillHimself", 30, 0, "", Seq(), 0, Tuple3(Some("humanitarian"), None, None)),
+ ComputedTile(2013, 0, PeriodType.Year.periodTypeName, "2013", "Twitter", 8, 1, 2, "HamillHimself", 90, 0, "", Seq(), 0, Tuple3(Some("humanitarian"), None, None)),
+ ComputedTile(2014, 0, PeriodType.Year.periodTypeName, "2014", "Twitter", 8, 1, 2, "HamillHimself", 91, 0, "", Seq(), 0, Tuple3(Some("humanitarian"), None, None)),
+ ComputedTile(2015, 0, PeriodType.Year.periodTypeName, "2015", "Twitter", 8, 1, 2, "HamillHimself", 92, 0, "", Seq(), 0, Tuple3(Some("humanitarian"), None, None)),
+ ComputedTile(2016, 0, PeriodType.Year.periodTypeName, "2016", "Twitter", 8, 1, 2, "HamillHimself", 93, 0, "", Seq(), 0, Tuple3(Some("humanitarian"), None, None)),
+ ComputedTile(2017, 0, PeriodType.Year.periodTypeName, "2017", "Twitter", 8, 1, 2, "HamillHimself", 94, 0, "", Seq(), 0, Tuple3(Some("humanitarian"), None, None)),
+
+ ComputedTile(2010, 0, PeriodType.Year.periodTypeName, "2010", "Twitter", 8, 1, 2, "HamillHimself", 10, 0, "", Seq(), 0, Tuple3(Some("syria"), None, None)),
+ ComputedTile(2011, 0, PeriodType.Year.periodTypeName, "2011", "Twitter", 8, 1, 2, "HamillHimself", 20, 0, "", Seq(), 0, Tuple3(Some("syria"), None, None)),
+ ComputedTile(2012, 0, PeriodType.Year.periodTypeName, "2012", "Twitter", 8, 1, 2, "HamillHimself", 30, 0, "", Seq(), 0, Tuple3(Some("syria"), None, None)),
+ ComputedTile(2013, 0, PeriodType.Year.periodTypeName, "2013", "Twitter", 8, 1, 2, "HamillHimself", 20, 0, "", Seq(), 0, Tuple3(Some("syria"), None, None)),
+ ComputedTile(2014, 0, PeriodType.Year.periodTypeName, "2014", "Twitter", 8, 1, 2, "HamillHimself", 40, 0, "", Seq(), 0, Tuple3(Some("syria"), None, None)),
+ ComputedTile(2015, 0, PeriodType.Year.periodTypeName, "2015", "Twitter", 8, 1, 2, "HamillHimself", 30, 0, "", Seq(), 0, Tuple3(Some("syria"), None, None)),
+ ComputedTile(2016, 0, PeriodType.Year.periodTypeName, "2016", "Twitter", 8, 1, 2, "HamillHimself", 40, 0, "", Seq(), 0, Tuple3(Some("syria"), None, None)),
+ ComputedTile(2017, 0, PeriodType.Year.periodTypeName, "2017", "Twitter", 8, 1, 2, "HamillHimself", 50, 0, "", Seq(), 0, Tuple3(Some("syria"), None, None))
)
val trends = ComputedTilesToComputedTrends(sc.makeRDD(tiles)).collect()
assert(trends.map(_.score.toInt).sorted.toList == List(4, 13, 16))
@@ -103,14 +103,14 @@ class ComputedTilesToHatmapTrendsSpec extends FlatSpec with BeforeAndAfter {
it should "result in different scores for different pipelines" in {
val tiles = Seq(
- ComputedTile(2010, 0, PeriodType.Year.periodTypeName, "2010", "twitter", 8, 1, 2, "HamillHimself", 100, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
- ComputedTile(2011, 0, PeriodType.Year.periodTypeName, "2011", "twitter", 8, 1, 2, "HamillHimself", 120, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
- ComputedTile(2012, 0, PeriodType.Year.periodTypeName, "2012", "twitter", 8, 1, 2, "HamillHimself", 200, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
- ComputedTile(2013, 0, PeriodType.Year.periodTypeName, "2013", "twitter", 8, 1, 2, "HamillHimself", 130, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
- ComputedTile(2014, 0, PeriodType.Year.periodTypeName, "2014", "twitter", 8, 1, 2, "HamillHimself", 300, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
- ComputedTile(2015, 0, PeriodType.Year.periodTypeName, "2015", "twitter", 8, 1, 2, "HamillHimself", 140, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
- ComputedTile(2016, 0, PeriodType.Year.periodTypeName, "2016", "twitter", 8, 1, 2, "HamillHimself", 400, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
- ComputedTile(2017, 0, PeriodType.Year.periodTypeName, "2017", "twitter", 8, 1, 2, "HamillHimself", 150, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
+ ComputedTile(2010, 0, PeriodType.Year.periodTypeName, "2010", "Twitter", 8, 1, 2, "HamillHimself", 100, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
+ ComputedTile(2011, 0, PeriodType.Year.periodTypeName, "2011", "Twitter", 8, 1, 2, "HamillHimself", 120, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
+ ComputedTile(2012, 0, PeriodType.Year.periodTypeName, "2012", "Twitter", 8, 1, 2, "HamillHimself", 200, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
+ ComputedTile(2013, 0, PeriodType.Year.periodTypeName, "2013", "Twitter", 8, 1, 2, "HamillHimself", 130, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
+ ComputedTile(2014, 0, PeriodType.Year.periodTypeName, "2014", "Twitter", 8, 1, 2, "HamillHimself", 300, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
+ ComputedTile(2015, 0, PeriodType.Year.periodTypeName, "2015", "Twitter", 8, 1, 2, "HamillHimself", 140, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
+ ComputedTile(2016, 0, PeriodType.Year.periodTypeName, "2016", "Twitter", 8, 1, 2, "HamillHimself", 400, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
+ ComputedTile(2017, 0, PeriodType.Year.periodTypeName, "2017", "Twitter", 8, 1, 2, "HamillHimself", 150, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
ComputedTile(2010, 0, PeriodType.Year.periodTypeName, "2010", "reddit", 8, 1, 2, "HamillHimself", 10, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
ComputedTile(2011, 0, PeriodType.Year.periodTypeName, "2011", "reddit", 8, 1, 2, "HamillHimself", 20, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
@@ -136,32 +136,32 @@ class ComputedTilesToHatmapTrendsSpec extends FlatSpec with BeforeAndAfter {
it should "result in different scores for different zoom levels" in {
val tiles = Seq(
- ComputedTile(2010, 0, PeriodType.Year.periodTypeName, "2010", "twitter", 8, 1, 2, "HamillHimself", 100, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
- ComputedTile(2011, 0, PeriodType.Year.periodTypeName, "2011", "twitter", 8, 1, 2, "HamillHimself", 120, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
- ComputedTile(2012, 0, PeriodType.Year.periodTypeName, "2012", "twitter", 8, 1, 2, "HamillHimself", 200, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
- ComputedTile(2013, 0, PeriodType.Year.periodTypeName, "2013", "twitter", 8, 1, 2, "HamillHimself", 130, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
- ComputedTile(2014, 0, PeriodType.Year.periodTypeName, "2014", "twitter", 8, 1, 2, "HamillHimself", 300, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
- ComputedTile(2015, 0, PeriodType.Year.periodTypeName, "2015", "twitter", 8, 1, 2, "HamillHimself", 140, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
- ComputedTile(2016, 0, PeriodType.Year.periodTypeName, "2016", "twitter", 8, 1, 2, "HamillHimself", 400, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
- ComputedTile(2017, 0, PeriodType.Year.periodTypeName, "2017", "twitter", 8, 1, 2, "HamillHimself", 150, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
-
- ComputedTile(2010, 0, PeriodType.Year.periodTypeName, "2010", "twitter", 9, 1, 2, "HamillHimself", 100, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
- ComputedTile(2011, 0, PeriodType.Year.periodTypeName, "2011", "twitter", 9, 1, 2, "HamillHimself", 120, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
- ComputedTile(2012, 0, PeriodType.Year.periodTypeName, "2012", "twitter", 9, 1, 2, "HamillHimself", 200, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
- ComputedTile(2013, 0, PeriodType.Year.periodTypeName, "2013", "twitter", 9, 1, 2, "HamillHimself", 130, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
- ComputedTile(2014, 0, PeriodType.Year.periodTypeName, "2014", "twitter", 9, 1, 2, "HamillHimself", 300, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
- ComputedTile(2015, 0, PeriodType.Year.periodTypeName, "2015", "twitter", 9, 1, 2, "HamillHimself", 140, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
- ComputedTile(2016, 0, PeriodType.Year.periodTypeName, "2016", "twitter", 9, 1, 2, "HamillHimself", 400, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
- ComputedTile(2017, 0, PeriodType.Year.periodTypeName, "2017", "twitter", 9, 1, 2, "HamillHimself", 150, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
-
- ComputedTile(2010, 0, PeriodType.Year.periodTypeName, "2010", "twitter", 10, 1, 2, "HamillHimself", 100, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
- ComputedTile(2011, 0, PeriodType.Year.periodTypeName, "2011", "twitter", 10, 1, 2, "HamillHimself", 120, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
- ComputedTile(2012, 0, PeriodType.Year.periodTypeName, "2012", "twitter", 10, 1, 2, "HamillHimself", 200, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
- ComputedTile(2013, 0, PeriodType.Year.periodTypeName, "2013", "twitter", 10, 1, 2, "HamillHimself", 130, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
- ComputedTile(2014, 0, PeriodType.Year.periodTypeName, "2014", "twitter", 10, 1, 2, "HamillHimself", 300, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
- ComputedTile(2015, 0, PeriodType.Year.periodTypeName, "2015", "twitter", 10, 1, 2, "HamillHimself", 140, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
- ComputedTile(2016, 0, PeriodType.Year.periodTypeName, "2016", "twitter", 10, 1, 2, "HamillHimself", 400, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
- ComputedTile(2017, 0, PeriodType.Year.periodTypeName, "2017", "twitter", 10, 1, 2, "HamillHimself", 150, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None))
+ ComputedTile(2010, 0, PeriodType.Year.periodTypeName, "2010", "Twitter", 8, 1, 2, "HamillHimself", 100, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
+ ComputedTile(2011, 0, PeriodType.Year.periodTypeName, "2011", "Twitter", 8, 1, 2, "HamillHimself", 120, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
+ ComputedTile(2012, 0, PeriodType.Year.periodTypeName, "2012", "Twitter", 8, 1, 2, "HamillHimself", 200, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
+ ComputedTile(2013, 0, PeriodType.Year.periodTypeName, "2013", "Twitter", 8, 1, 2, "HamillHimself", 130, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
+ ComputedTile(2014, 0, PeriodType.Year.periodTypeName, "2014", "Twitter", 8, 1, 2, "HamillHimself", 300, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
+ ComputedTile(2015, 0, PeriodType.Year.periodTypeName, "2015", "Twitter", 8, 1, 2, "HamillHimself", 140, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
+ ComputedTile(2016, 0, PeriodType.Year.periodTypeName, "2016", "Twitter", 8, 1, 2, "HamillHimself", 400, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
+ ComputedTile(2017, 0, PeriodType.Year.periodTypeName, "2017", "Twitter", 8, 1, 2, "HamillHimself", 150, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
+
+ ComputedTile(2010, 0, PeriodType.Year.periodTypeName, "2010", "Twitter", 9, 1, 2, "HamillHimself", 100, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
+ ComputedTile(2011, 0, PeriodType.Year.periodTypeName, "2011", "Twitter", 9, 1, 2, "HamillHimself", 120, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
+ ComputedTile(2012, 0, PeriodType.Year.periodTypeName, "2012", "Twitter", 9, 1, 2, "HamillHimself", 200, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
+ ComputedTile(2013, 0, PeriodType.Year.periodTypeName, "2013", "Twitter", 9, 1, 2, "HamillHimself", 130, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
+ ComputedTile(2014, 0, PeriodType.Year.periodTypeName, "2014", "Twitter", 9, 1, 2, "HamillHimself", 300, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
+ ComputedTile(2015, 0, PeriodType.Year.periodTypeName, "2015", "Twitter", 9, 1, 2, "HamillHimself", 140, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
+ ComputedTile(2016, 0, PeriodType.Year.periodTypeName, "2016", "Twitter", 9, 1, 2, "HamillHimself", 400, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
+ ComputedTile(2017, 0, PeriodType.Year.periodTypeName, "2017", "Twitter", 9, 1, 2, "HamillHimself", 150, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
+
+ ComputedTile(2010, 0, PeriodType.Year.periodTypeName, "2010", "Twitter", 10, 1, 2, "HamillHimself", 100, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
+ ComputedTile(2011, 0, PeriodType.Year.periodTypeName, "2011", "Twitter", 10, 1, 2, "HamillHimself", 120, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
+ ComputedTile(2012, 0, PeriodType.Year.periodTypeName, "2012", "Twitter", 10, 1, 2, "HamillHimself", 200, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
+ ComputedTile(2013, 0, PeriodType.Year.periodTypeName, "2013", "Twitter", 10, 1, 2, "HamillHimself", 130, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
+ ComputedTile(2014, 0, PeriodType.Year.periodTypeName, "2014", "Twitter", 10, 1, 2, "HamillHimself", 300, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
+ ComputedTile(2015, 0, PeriodType.Year.periodTypeName, "2015", "Twitter", 10, 1, 2, "HamillHimself", 140, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
+ ComputedTile(2016, 0, PeriodType.Year.periodTypeName, "2016", "Twitter", 10, 1, 2, "HamillHimself", 400, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None)),
+ ComputedTile(2017, 0, PeriodType.Year.periodTypeName, "2017", "Twitter", 10, 1, 2, "HamillHimself", 150, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None))
)
val trends = ComputedTilesToComputedTrends(sc.makeRDD(tiles)).collect()
assert(trends.map(_.score.toInt).sorted.toList == List(20, 20, 20))
@@ -169,9 +169,9 @@ class ComputedTilesToHatmapTrendsSpec extends FlatSpec with BeforeAndAfter {
it should "format groups" in {
val group = ComputedTilesToComputedTrends.tileGroup(
- ComputedTile(2017, 0, PeriodType.Year.periodTypeName, "2017", "twitter", 10, 1, 2, "HamillHimself", 150, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None))
+ ComputedTile(2017, 0, PeriodType.Year.periodTypeName, "2017", "Twitter", 10, 1, 2, "HamillHimself", 150, 0, "", Seq(), 0, Tuple3(Some("europe"), None, None))
)
- assert(group == "(twitter,(Some(europe),None,None),10)")
+ assert(group == "(Twitter,(Some(europe),None,None),10)")
}
}
diff --git a/project-fortis-spark/src/test/scala/com/microsoft/partnercatalyst/fortis/spark/sink/cassandra/CassandraConjunctiveTopicsTestSpec.scala b/project-fortis-spark/src/test/scala/com/microsoft/partnercatalyst/fortis/spark/sink/cassandra/CassandraConjunctiveTopicsTestSpec.scala
index 32f861a..a175008 100644
--- a/project-fortis-spark/src/test/scala/com/microsoft/partnercatalyst/fortis/spark/sink/cassandra/CassandraConjunctiveTopicsTestSpec.scala
+++ b/project-fortis-spark/src/test/scala/com/microsoft/partnercatalyst/fortis/spark/sink/cassandra/CassandraConjunctiveTopicsTestSpec.scala
@@ -12,7 +12,7 @@ class CassandraConjunctiveTopicsTestSpec extends FlatSpec {
it should "flat map keywords" in {
val period = Period("day-2017-08-11")
val keywords = CassandraConjunctiveTopics.flatMapKeywords(Event(
- pipelinekey = "twitter",
+ pipelinekey = "Twitter",
computedfeatures = Features(
mentions = 1,
sentiment = Sentiment(1.0),
@@ -47,7 +47,7 @@ class CassandraConjunctiveTopicsTestSpec extends FlatSpec {
it should "produce an non-empty sequence" in {
val period = Period("day-2017-08-11")
val topics = CassandraConjunctiveTopics(Event(
- pipelinekey = "twitter",
+ pipelinekey = "Twitter",
computedfeatures = Features(
mentions = 1,
sentiment = Sentiment(1.0),
@@ -78,7 +78,7 @@ class CassandraConjunctiveTopicsTestSpec extends FlatSpec {
mentioncount = 1,
perioddate = period.startTime(),
periodtype = "day",
- pipelinekey = "twitter",
+ pipelinekey = "Twitter",
tileid = "8_120_142",
tilez = 8,
topic = "europe"
@@ -88,7 +88,7 @@ class CassandraConjunctiveTopicsTestSpec extends FlatSpec {
it should "produce a non-empty sequence on single keyword" in {
val period = Period("day-2017-08-11")
val topics = CassandraConjunctiveTopics(Event(
- pipelinekey = "twitter",
+ pipelinekey = "Twitter",
computedfeatures = Features(
mentions = 1,
sentiment = Sentiment(1.0),
@@ -119,7 +119,7 @@ class CassandraConjunctiveTopicsTestSpec extends FlatSpec {
mentioncount = 1,
perioddate = period.startTime(),
periodtype = "day",
- pipelinekey = "twitter",
+ pipelinekey = "Twitter",
tileid = "8_120_142",
tilez = 8,
topic = "europe"
@@ -128,7 +128,7 @@ class CassandraConjunctiveTopicsTestSpec extends FlatSpec {
it should "produce an empty sequence on empty places" in {
val topics = CassandraConjunctiveTopics(Event(
- pipelinekey = "twitter",
+ pipelinekey = "Twitter",
computedfeatures = Features(
mentions = 1,
sentiment = Sentiment(1.0),
@@ -157,7 +157,7 @@ class CassandraConjunctiveTopicsTestSpec extends FlatSpec {
it should "produce an empty sequence on empty keywords" in {
val topics = CassandraConjunctiveTopics(Event(
- pipelinekey = "twitter",
+ pipelinekey = "Twitter",
computedfeatures = Features(
mentions = 1,
sentiment = Sentiment(1.0),
diff --git a/project-fortis-spark/src/test/scala/com/microsoft/partnercatalyst/fortis/spark/sinks/cassandra/aggregators/ConjunctiveTopicsOffineAggregatorTestSpec.scala b/project-fortis-spark/src/test/scala/com/microsoft/partnercatalyst/fortis/spark/sinks/cassandra/aggregators/ConjunctiveTopicsOffineAggregatorTestSpec.scala
index 65aaaa5..2c316a0 100644
--- a/project-fortis-spark/src/test/scala/com/microsoft/partnercatalyst/fortis/spark/sinks/cassandra/aggregators/ConjunctiveTopicsOffineAggregatorTestSpec.scala
+++ b/project-fortis-spark/src/test/scala/com/microsoft/partnercatalyst/fortis/spark/sinks/cassandra/aggregators/ConjunctiveTopicsOffineAggregatorTestSpec.scala
@@ -52,7 +52,7 @@ class ConjunctiveTopicsOffineAggregatorTestSpec extends FlatSpec with BeforeAndA
it should "produce an all/all aggregates for single event" in {
val period = Period("day-2017-08-11")
val events: RDD[Event] = sc.parallelize(Seq(Event(
- pipelinekey = "twitter",
+ pipelinekey = "Twitter",
computedfeatures = Features(
mentions = 1,
sentiment = Sentiment(1.0),
@@ -107,7 +107,7 @@ class ConjunctiveTopicsOffineAggregatorTestSpec extends FlatSpec with BeforeAndA
val period = Period("day-2017-08-11")
val events: RDD[Event] = sc.parallelize(Seq(
Event(
- pipelinekey = "twitter",
+ pipelinekey = "Twitter",
computedfeatures = Features(
mentions = 1,
sentiment = Sentiment(1.0),
@@ -132,7 +132,7 @@ class ConjunctiveTopicsOffineAggregatorTestSpec extends FlatSpec with BeforeAndA
title = ""
),
Event(
- pipelinekey = "twitter",
+ pipelinekey = "Twitter",
computedfeatures = Features(
mentions = 1,
sentiment = Sentiment(1.0),
@@ -177,7 +177,7 @@ class ConjunctiveTopicsOffineAggregatorTestSpec extends FlatSpec with BeforeAndA
mentioncount = 2,
perioddate = period.startTime(),
periodtype = "day",
- pipelinekey = "twitter",
+ pipelinekey = "Twitter",
tileid = "8_120_142",
tilez = 8,
topic = "europe"
@@ -227,7 +227,7 @@ class ConjunctiveTopicsOffineAggregatorTestSpec extends FlatSpec with BeforeAndA
title = ""
),
Event(
- pipelinekey = "twitter",
+ pipelinekey = "Twitter",
computedfeatures = Features(
mentions = 1,
sentiment = Sentiment(1.0),
@@ -273,7 +273,7 @@ class ConjunctiveTopicsOffineAggregatorTestSpec extends FlatSpec with BeforeAndA
mentioncount = 1,
perioddate = period.startTime(),
periodtype = "day",
- pipelinekey = "twitter",
+ pipelinekey = "Twitter",
tileid = "8_120_142",
tilez = 8,
topic = "europe"
diff --git a/project-fortis-spark/src/test/scala/com/microsoft/partnercatalyst/fortis/spark/sinks/cassandra/aggregators/PopularPlacesOfflineAggregatorTestSpec.scala b/project-fortis-spark/src/test/scala/com/microsoft/partnercatalyst/fortis/spark/sinks/cassandra/aggregators/PopularPlacesOfflineAggregatorTestSpec.scala
index 8533f27..b70baef 100644
--- a/project-fortis-spark/src/test/scala/com/microsoft/partnercatalyst/fortis/spark/sinks/cassandra/aggregators/PopularPlacesOfflineAggregatorTestSpec.scala
+++ b/project-fortis-spark/src/test/scala/com/microsoft/partnercatalyst/fortis/spark/sinks/cassandra/aggregators/PopularPlacesOfflineAggregatorTestSpec.scala
@@ -52,7 +52,7 @@ class PopularPlacesOfflineAggregatorTestSpec extends FlatSpec with BeforeAndAfte
it should "produce an all/all aggregates for single event" in {
val period = Period("day-2017-08-11")
val events: RDD[Event] = sc.parallelize(Seq(Event(
- pipelinekey = "twitter",
+ pipelinekey = "Twitter",
computedfeatures = Features(
mentions = 1,
sentiment = Sentiment(0.5),
@@ -112,7 +112,7 @@ class PopularPlacesOfflineAggregatorTestSpec extends FlatSpec with BeforeAndAfte
perioddate = period.startTime(),
externalsourceid = "all",
periodtype = "day",
- pipelinekey = "twitter",
+ pipelinekey = "Twitter",
mentioncount = 1,
avgsentimentnumerator = 500,
placeid = "wof-101731037",
@@ -129,7 +129,7 @@ class PopularPlacesOfflineAggregatorTestSpec extends FlatSpec with BeforeAndAfte
val period = Period("day-2017-08-11")
val events: RDD[Event] = sc.parallelize(Seq(
Event(
- pipelinekey = "twitter",
+ pipelinekey = "Twitter",
computedfeatures = Features(
mentions = 1,
sentiment = Sentiment(0.7),
@@ -154,7 +154,7 @@ class PopularPlacesOfflineAggregatorTestSpec extends FlatSpec with BeforeAndAfte
title = ""
),
Event(
- pipelinekey = "twitter",
+ pipelinekey = "Twitter",
computedfeatures = Features(
mentions = 1,
sentiment = Sentiment(0.5),
@@ -215,7 +215,7 @@ class PopularPlacesOfflineAggregatorTestSpec extends FlatSpec with BeforeAndAfte
perioddate = period.startTime(),
externalsourceid = "all",
periodtype = "day",
- pipelinekey = "twitter",
+ pipelinekey = "Twitter",
mentioncount = 2,
avgsentimentnumerator = 1200,
placeid = "wof-907128885",
@@ -232,7 +232,7 @@ class PopularPlacesOfflineAggregatorTestSpec extends FlatSpec with BeforeAndAfte
val period = Period("day-2017-08-11")
val events: RDD[Event] = sc.parallelize(Seq(
Event(
- pipelinekey = "twitter",
+ pipelinekey = "Twitter",
computedfeatures = Features(
mentions = 1,
sentiment = Sentiment(0.7),
@@ -318,7 +318,7 @@ class PopularPlacesOfflineAggregatorTestSpec extends FlatSpec with BeforeAndAfte
perioddate = period.startTime(),
externalsourceid = "all",
periodtype = "day",
- pipelinekey = "twitter",
+ pipelinekey = "Twitter",
mentioncount = 1,
avgsentimentnumerator = 700,
placeid = "wof-907128885",
CassandraTest.scala
, and all file names containingTestSpec
specifypipelinekey
astwitter
. Here's one example.They should instead define
pipelinekey
asTwitter
as defined bypipelinekey
in TwitterAnalyzer.scala.