Skip to content

Commit

Permalink
Merge pull request #1 from andreweacott/feature/remove_shazam_bucket
Browse files Browse the repository at this point in the history
Feature/remove shazam bucket
  • Loading branch information
markhatton authored Aug 22, 2018
2 parents 6c9db71 + a988bab commit b81a36b
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name := "datapipeline-dsl"

version := "0.1"
version := "0.1.1-SNAPSHOT"

scalaVersion := "2.12.5"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ object AwsDataPipelineCompiler extends App {

val pipelineBuilder: PipelineBuilder = reflectivelyLoadPipelineBuilder(className)

writePipelineJsonToFile(pipelineBuilder)
val filename = s"$CurrentWorkingDir${pipelineBuilder.name}.json"
writePipelineJsonToFile(pipelineBuilder, filename)

}

Expand Down Expand Up @@ -106,9 +107,7 @@ object AwsDataPipelineCompilerHelpers {
pipelineBuilder
}

def writePipelineJsonToFile(pipelineBuilder: PipelineBuilder): Unit = {
val filename = s"$CurrentWorkingDir${pipelineBuilder.name}.json"

def writePipelineJsonToFile(pipelineBuilder: PipelineBuilder, filename: String): Unit = {
println(s"Writing pipeline definition to: $filename")

val os = new FileOutputStream(filename)
Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/datapipeline/dsl/Json.scala
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ object ResourceJsonRenderer {
("coreInstanceBidPrice" -> coreInstanceBidPrice.map(_.toString)) ~
("useOnDemandOnLastAttempt" -> useOnDemandOnLastAttempt.map(_.toString)) ~
("terminateAfter" -> terminateAfter.map(_.toString)) ~
("emrLogUri" -> s"s3://szm-den-aws-data-pipeline/temp/$${environment}/$pipelineName/logs/emr") ~
("emrLogUri" -> emrLogUri) ~
("keyPair" -> keyPair) ~
("region" -> region) ~
("applications" -> applications) ~
Expand Down
1 change: 1 addition & 0 deletions src/main/scala/datapipeline/dsl/Resource.scala
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ case class EmrCluster(name: String,
coreInstanceBidPrice: Option[BigDecimal] = None,
useOnDemandOnLastAttempt: Option[Boolean] = None,
terminateAfter: Option[FiniteDuration] = None,
emrLogUri: Option[String] = None,
keyPair: Option[String] = None,
region: Option[String] = None,
applications: Seq[String] = Nil,
Expand Down
3 changes: 2 additions & 1 deletion src/test/scala/datapipeline/dsl/AwsDataPipelineSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,7 @@ class AwsDataPipelineSpec extends WordSpec with Matchers {
terminateAfter = Some(5.hours),
keyPair = Some("data-engineering"),
region = Some("us-east-1"),
emrLogUri = Some("s3://s3-log-bucket"),
applications = Seq("Spark"),
configuration = Some(EmrConfiguration(
name = "optimize spark",
Expand Down Expand Up @@ -291,7 +292,7 @@ class AwsDataPipelineSpec extends WordSpec with Matchers {
| "coreInstanceBidPrice": "0.66",
| "useOnDemandOnLastAttempt": "true",
| "terminateAfter": "5 hours",
| "emrLogUri": "s3://szm-den-aws-data-pipeline/temp/${environment}/base-pipeline/logs/emr",
| "emrLogUri": "s3://s3-log-bucket",
| "keyPair": "data-engineering",
| "region": "us-east-1",
| "applications": ["Spark"],
Expand Down

0 comments on commit b81a36b

Please sign in to comment.