You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@griffin.apache.org by GitBox <gi...@apache.org> on 2019/12/10 06:27:33 UTC
[GitHub] [griffin] chitralverma commented on a change in pull request #558:
[WIP] Enum based configs
chitralverma commented on a change in pull request #558: [WIP] Enum based configs
URL: https://github.com/apache/griffin/pull/558#discussion_r355859897
##########
File path: measure/src/main/scala/org/apache/griffin/measure/Application.scala
##########
@@ -63,10 +63,10 @@ object Application extends Loggable {
val allParam: GriffinConfig = GriffinConfig(envParam, dqParam)
// choose process
- val procType = ProcessType(allParam.getDqConfig.getProcType)
+ val procType = ProcessType.withNameWithDefault(allParam.getDqConfig.getProcType)
val dqApp: DQApp = procType match {
- case BatchProcessType => BatchDQApp(allParam)
- case StreamingProcessType => StreamingDQApp(allParam)
+ case ProcessType.BatchProcessType => BatchDQApp(allParam)
Review comment:
@tusharpatil20
Static imports with wildcard can be used here to minimise the code change/ number of File changes.
You may do something like this,
```suggestion
case BatchProcessType => BatchDQApp(allParam)
```
by importing `import org.apache.griffin.measure.configuration.enums.ProcessType` instead of `import org.apache.griffin.measure.configuration.enums._`.
This can be followed for all enums, wherever they are used.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services