Repository: bigtop Updated Branches: refs/heads/master 97e743e16 -> 23ea10ecc
BIGTOP-2148: generator.SparkDriver outputs empty data in cluster mode Signed-off-by: RJ Nowling <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/bigtop/repo Commit: http://git-wip-us.apache.org/repos/asf/bigtop/commit/23ea10ec Tree: http://git-wip-us.apache.org/repos/asf/bigtop/tree/23ea10ec Diff: http://git-wip-us.apache.org/repos/asf/bigtop/diff/23ea10ec Branch: refs/heads/master Commit: 23ea10eccc9f652d7728dba1208d0de3cdb17a00 Parents: 97e743e Author: Kengo Seki <[email protected]> Authored: Wed Nov 18 00:18:39 2015 +0900 Committer: RJ Nowling <[email protected]> Committed: Wed Jan 13 13:05:29 2016 -0600 ---------------------------------------------------------------------- .../org/apache/bigpetstore/spark/generator/SparkDriver.scala | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/bigtop/blob/23ea10ec/bigtop-bigpetstore/bigpetstore-spark/src/main/scala/org/apache/bigpetstore/spark/generator/SparkDriver.scala ---------------------------------------------------------------------- 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 f86360e..f27a154 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 }
