You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bigtop.apache.org by ja...@apache.org on 2015/02/05 00:42:24 UTC
bigtop git commit: BIGTOP-1652. Fix BigPetStore-Spark Data format
regression
Repository: bigtop
Updated Branches:
refs/heads/master 42ac3a5c1 -> a4850e641
BIGTOP-1652. Fix BigPetStore-Spark Data format regression
Signed-off-by: jayunit100 <ja...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/bigtop/repo
Commit: http://git-wip-us.apache.org/repos/asf/bigtop/commit/a4850e64
Tree: http://git-wip-us.apache.org/repos/asf/bigtop/tree/a4850e64
Diff: http://git-wip-us.apache.org/repos/asf/bigtop/diff/a4850e64
Branch: refs/heads/master
Commit: a4850e641ff151f88b5815e632827a3e97e6e713
Parents: 42ac3a5
Author: RJ Nowling <rn...@gmail.com>
Authored: Wed Feb 4 18:39:30 2015 -0500
Committer: jayunit100 <ja...@apache.org>
Committed: Wed Feb 4 18:41:59 2015 -0500
----------------------------------------------------------------------
.../org/apache/bigpetstore/spark/generator/SparkDriver.scala | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/bigtop/blob/a4850e64/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 19d1565..7649c48 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
@@ -196,11 +196,11 @@ object SparkDriver {
def lineItem(t: Transaction, date:Date, p:Product): String = {
t.getStore.getId + "," +
- t.getStore.getLocation+ "," +
+ t.getStore.getLocation.getZipcode + "," +
t.getStore.getLocation.getCity + "," +
t.getStore.getLocation.getState + "," +
t.getCustomer.getId + "," +
- t.getCustomer.getName.getFirst + " " +t.getCustomer.getName.getSecond + "," +
+ t.getCustomer.getName.getFirst + "," +t.getCustomer.getName.getSecond + "," +
t.getCustomer.getLocation.getZipcode + "," +
t.getCustomer.getLocation.getCity + "," +
t.getCustomer.getLocation.getState + "," +
@@ -210,7 +210,7 @@ object SparkDriver {
def writeData(transactionRDD : RDD[Transaction]) {
val initialDate : Long = new Date().getTime()
- val transactionStringsRDD = transactionRDD.map {
+ val transactionStringsRDD = transactionRDD.flatMap {
transaction =>
val products = transaction.getProducts()