aboutsummaryrefslogtreecommitdiff
path: root/bigtop-bigpetstore
diff options
context:
space:
mode:
authorRJ Nowling <rnowling@gmail.com>2015-02-04 18:39:30 -0500
committerjayunit100 <jay@apache.org>2015-02-04 18:41:59 -0500
commita4850e641ff151f88b5815e632827a3e97e6e713 (patch)
tree97cae50832a21ad9c9f65462b37836ca9440e541 /bigtop-bigpetstore
parent42ac3a5c1ceca3605741674a7bda27579734880d (diff)
BIGTOP-1652. Fix BigPetStore-Spark Data format regression
Signed-off-by: jayunit100 <jay@apache.org>
Diffstat (limited to 'bigtop-bigpetstore')
-rw-r--r--bigtop-bigpetstore/bigpetstore-spark/src/main/scala/org/apache/bigpetstore/spark/generator/SparkDriver.scala6
1 files changed, 3 insertions, 3 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 19d1565a..7649c480 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()