aboutsummaryrefslogtreecommitdiff
path: root/bigtop-bigpetstore
diff options
context:
space:
mode:
authorKengo Seki <sekikn@gmail.com>2015-11-18 00:18:39 +0900
committerRJ Nowling <rnowling@gmail.com>2016-01-13 13:05:29 -0600
commit23ea10eccc9f652d7728dba1208d0de3cdb17a00 (patch)
tree61c6cbeccd6d952a8e9492e3516c31f308fd25e6 /bigtop-bigpetstore
parent97e743e16fa058c2be3d564dd0705d8cc04c35bf (diff)
BIGTOP-2148: generator.SparkDriver outputs empty data in cluster mode
Signed-off-by: RJ Nowling <rnowling@gmail.com>
Diffstat (limited to 'bigtop-bigpetstore')
-rw-r--r--bigtop-bigpetstore/bigpetstore-spark/src/main/scala/org/apache/bigpetstore/spark/generator/SparkDriver.scala3
1 files changed, 2 insertions, 1 deletions
diff --git a/bigtop-bigpetstore/bigpetstore-spark/src/main/scala/org/apache/bigpetstore/spark/generator/SparkDriver.scala b/bigtop-bigpetstore/bigpetstore-spark/src/main/scala/org/apache/bigpetstore/spark/generator/SparkDriver.scala
index f86360e8..f27a1545 100644
--- a/bigtop-bigpetstore/bigpetstore-spark/src/main/scala/org/apache/bigpetstore/spark/generator/SparkDriver.scala
+++ b/bigtop-bigpetstore/bigpetstore-spark/src/main/scala/org/apache/bigpetstore/spark/generator/SparkDriver.scala
@@ -144,6 +144,7 @@ object SparkDriver {
val storesBC = sc.broadcast(stores)
val productBC = sc.broadcast(inputData.getProductCategories())
val customerRDD = sc.parallelize(customers)
+ val simLen = simulationLength
val nextSeed = seedFactory.getNextSeed()
println("...Done broadcasting stores and products.")
@@ -168,7 +169,7 @@ object SparkDriver {
var transaction = transGen.generate()
//Create a list of this customer's transactions for the time period
- while(transaction.getDateTime() < simulationLength) {
+ while(transaction.getDateTime() < simLen) {
if (transaction.getDateTime > BURNIN_TIME) {
transactions = transaction :: transactions
}