我正在尝试订阅目录以获取通知。但找不到符号“thenAppy”。请帮忙。
// subscription to notifications
CompletionStage<NotificationSubscriptionControl> controlStage =
queryApi.subscribeToNotifications(consumerSettings)
.thenApply(subscription -> {
subscription
.notifications()
.runWith(Sink.foreach(notification ->
// this callback is called each time a new batch publication happens in catalog
System.out.printf("catalog %s has a new version %d\n", catalogHrn, notification.getCatalogVersion())
), myMaterializer);
return subscription.subscriptionControl();
});
[错误] 编译错误:[信息] ----------------------------------------- -------------------- [错误] Main.java:[41,25] 找不到符号符号:方法 thenApply((subscript...; }) 位置:接口 org.apache.flink.streaming.api.functions.source.SourceFunction [错误] Main.java:[44,65] 包 akka.stream.javadsl 不存在 [错误] Main.java:[47,40] 不能查找符号符号:变量 myMaterializer