-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[NU-1296] Ad-hoc tests with ververica in staging (#6127) - cherry pick
* [NU-1296] Ad-hoc tests with ververica (#5611) * With a new default parameter "isTest" in a couple of places ad-hoc test works without adding "flink-dropwizard-metrics-deps" to classpath * Removed 'isTest' param as we can use already present ComponentUseCase * One place was hardcoded to give dummy TestMetrics and this caused the test to fail, now it also matches on the ComponentUseCase Also some cleaning * Ad-hoc test goes through as everything gets dummy metrics in FlinkEngineRuntimeContextImpl Need to find a way to parse ComponentUseCase, so it still will be serializable on Flink * MetricsSpec passes with this change * Work in progress, works everywhere except for FlinkProcessRegistrar * FlinkProcessRegistrar now also works - there is no serialization error, parts of compilerData have to be initialized before using it in function * Getting MetricsProviderForScenario for FlinkEngineRuntimeContextImpl and SourceMetricsFunction is moved to MetricsProviderForFlink Also renamed FlinkEngineRuntimeContextImpl method to 'apply' as it is used to create new instance of it * Name changed as we create MetricProvider, not just get it from somewhere --------- Co-authored-by: Szymon Bogusz <[email protected]>
- Loading branch information
1 parent
f2494ba
commit 92779e7
Showing
7 changed files
with
70 additions
and
14 deletions.
There are no files selected for viewing
9 changes: 8 additions & 1 deletion
9
...c/main/scala/pl/touk/nussknacker/ui/process/processingtype/ProcessingTypeDataReader.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
19 changes: 19 additions & 0 deletions
19
.../src/main/scala/pl/touk/nussknacker/engine/process/compiler/MetricsProviderForFlink.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,19 @@ | ||
package pl.touk.nussknacker.engine.process.compiler | ||
|
||
import org.apache.flink.api.common.functions.RuntimeContext | ||
import pl.touk.nussknacker.engine.api.process.ComponentUseCase | ||
import pl.touk.nussknacker.engine.util.metrics.{MetricsProviderForScenario, NoOpMetricsProviderForScenario} | ||
|
||
object MetricsProviderForFlink { | ||
|
||
def createMetricsProvider( | ||
componentUseCase: ComponentUseCase, | ||
runtimeContext: RuntimeContext | ||
): MetricsProviderForScenario = { | ||
componentUseCase match { | ||
case ComponentUseCase.TestRuntime => NoOpMetricsProviderForScenario | ||
case _ => new FlinkMetricsProviderForScenario(runtimeContext) | ||
} | ||
} | ||
|
||
} |
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