Commit 48273af6 authored by Zied SELLAMI's avatar Zied SELLAMI
Browse files

Initial commit

parent c19acfe2
name := "burndownchart"
scalaVersion := "2.11.1"
import sbt._
val sparkVersion = "2.2.0"
libraryDependencies ++= Seq(
"org.apache.spark" %% "spark-core" % sparkVersion % "provided",
"org.apache.spark" %% "spark-sql" % sparkVersion,
"org.apache.spark" %% "spark-yarn" % sparkVersion
)
\ No newline at end of file
"org.apache.spark" %% "spark-sql" % sparkVersion
)
\ No newline at end of file
......@@ -49,7 +49,7 @@ object Runner {
implicit val sparkSession = SparkSession
.builder()
.appName("SparkSession for Burndownchart")
.master("local[*]")
// .master("local[*]")
.getOrCreate()
import sparkSession.implicits._
......@@ -154,7 +154,7 @@ object Runner {
filtred.map(op => {
val addOperationForRemove = ops.filter(add => add.operation == ADD && add.timestamp.before(op.timestamp) && add.value == -1f * op.value)
if(addOperationForRemove.isEmpty){
Seq(Operation(op.id, startDate, Timestamp.valueOf(startDate.toLocalDate.atTime(00,00)),ADD, -1f * op.value))
Seq(Operation(op.id, startDate, Timestamp.valueOf(startDate.toLocalDate.atTime(0,0)),ADD, -1f * op.value))
}else
{
Seq()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment