-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refacted Config into Metadata object
- Loading branch information
Showing
39 changed files
with
312 additions
and
263 deletions.
There are no files selected for viewing
4 changes: 2 additions & 2 deletions
4
src/main/scala/com/metabolic/data/core/domain/CoreConfig.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
package com.metabolic.data.core.domain | ||
|
||
import com.amazonaws.regions.Regions | ||
import com.metabolic.data.mapper.domain.io.EngineMode | ||
import com.metabolic.data.mapper.domain.run.EngineMode | ||
import com.typesafe.config.ConfigFactory | ||
|
||
abstract class CoreConfig(val defaults: Defaults = Defaults(ConfigFactory.load()), | ||
abstract class CoreConfig( | ||
val environment: Environment = Environment("", EngineMode.Batch, "", false, "","", | ||
Regions.fromName("eu-central-1"), Option.empty, Option.empty, Option.empty)) |
15 changes: 0 additions & 15 deletions
15
src/main/scala/com/metabolic/data/core/domain/Defaults.scala
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
src/main/scala/com/metabolic/data/core/domain/Environment.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/main/scala/com/metabolic/data/core/services/spark/append/Appender.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
src/main/scala/com/metabolic/data/core/services/spark/reader/DataframeUnifiedReader.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
src/main/scala/com/metabolic/data/core/services/spark/writer/DataframeUnifiedWriter.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 0 additions & 46 deletions
46
src/main/scala/com/metabolic/data/mapper/domain/Config.scala
This file was deleted.
Oops, something went wrong.
17 changes: 17 additions & 0 deletions
17
src/main/scala/com/metabolic/data/mapper/domain/config/Config.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package com.metabolic.data.mapper.domain.config | ||
|
||
import com.metabolic.data.mapper.domain.io.{Sink, Source} | ||
import com.metabolic.data.mapper.domain.ops.Mapping | ||
|
||
case class Config(sources: Seq[Source], | ||
mappings: Seq[Mapping], | ||
sink: Sink, | ||
metadata: Metadata) | ||
|
||
case object Config { | ||
|
||
def apply(sources: Seq[Source], mapping: Mapping, sink: Sink, metadata: Metadata): Config = { | ||
new Config(sources, Seq(mapping), sink, metadata) | ||
} | ||
|
||
} |
21 changes: 21 additions & 0 deletions
21
src/main/scala/com/metabolic/data/mapper/domain/config/Metadata.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package com.metabolic.data.mapper.domain.config | ||
|
||
import com.metabolic.data.core.domain.Environment | ||
|
||
|
||
case class Metadata(name: String, | ||
description:String, | ||
owner: String, | ||
sqlUrl: String, | ||
confUrl: String, | ||
environment: Environment) { | ||
|
||
|
||
|
||
def getCanonicalName() = { | ||
name | ||
.toLowerCase() | ||
.replaceAll(" ", "-") | ||
} | ||
|
||
} |
Oops, something went wrong.