caicancai commented on code in PR #3257:
URL:
https://github.com/apache/incubator-streampark/pull/3257#discussion_r1367192631
##########
streampark-flink/streampark-flink-kubernetes-v2/streampark-flink-kubernetes-core/src/test/scala/org/apache/streampark/flink/kubernetes/v2/example/UsingOperator.scala:
##########
@@ -112,7 +112,30 @@ class UsingOperator extends AnyWordSpecLike with
BeforeAndAfterAll {
for {
_ <- FlinkK8sOperator.deployApplicationJob(114514, spec)
// subscribe job status
- _ <-
FlinkK8sObserver.evaluatedJobSnaps.flatSubscribeValues().debugPretty.runDrain
+ _ <-
FlinkK8sObserver.evaluatedJobSnaps.flatSubscribeValues().debugPretty.runDrain.fork
+ _ <-
FlinkK8sObserver.restSvcEndpointSnaps.flatSubscribeValues().debugPretty.runDrain
+ } yield ()
+ }
+
+ "Deploy a simple Flink application job with flinkConfiguration to Kubernetes
and subscribe job status and endpoint" in unsafeRun {
+ val spec = FlinkDeploymentDef(
+ name = "simple-appjob",
+ namespace = "fdev",
+ image = "flink:1.16",
+ flinkVersion = FlinkVersion.V1_16,
+ flinkConfiguration = Map("taskmanager.numberOfTaskSlots" -> "2"),
+ jobManager = JobManagerDef(cpu = 1, memory = "1024m", "2G"),
+ taskManager = TaskManagerDef(cpu = 1, memory = "1024m", "2G"),
+ job = JobDef(
+ jarURI =
"local:///opt/flink/examples/streaming/StateMachineExample.jar",
+ parallelism = 1
+ )
+ )
+ for {
+ _ <- FlinkK8sOperator.deployApplicationJob(114514, spec)
Review Comment:
done
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]