Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CORE-17386 - Create new topic for flow processor scheduled tasks. #1271

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,13 @@ private VirtualNode() {
public static final class ScheduledTask {
private ScheduledTask() {}

// TODO - duplicated to ease migration from first to second. First can be removed once integrated with runtime-os
public static final String SCHEDULED_TASK_DB_PROCESSOR = "scheduled.task.db.processor";
public static final String SCHEDULED_TASK_TOPIC_DB_PROCESSOR = "scheduled.task.db.processor";
public static final String SCHEDULED_TASK_NAME_DB_PROCESSOR = "deduplication-table-clean-up-task";
public static final String SCHEDULED_TASK_MAPPER_PROCESSOR = "scheduled.task.mapper.processor";
public static final String SCHEDULED_TASK_TOPIC_FLOW_PROCESSOR = "scheduled.task.flow.processor";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
public static final String SCHEDULED_TASK_TOPIC_FLOW_PROCESSOR = "scheduled.task.flow.processor";
public static final String SCHEDULED_TASK_FLOW_PROCESSOR_TOPIC = "scheduled.task.flow.processor";

I think we should do the same for the 2 above constants for consistency with rest of the cases (I missed that with SCHEDULED_TASK_DB_PROCESSOR).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure. I can add it in this PR if you want?

public static final String SCHEDULED_TASK_NAME_SESSION_TIMEOUT = "flow-session-timout";

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,9 @@ topics:
- flowMapper
producers:
- db
ScheduledTaskFlowProcessorTopic:
name: scheduled.task.flow.processor
consumers:
- flow
producers:
- db
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ class SchemaTests {
yamlFileData.forEach { (fileName: String, topics: Map<String, Map<String, *>>) ->
println("Testing: $fileName")
val potentialClass = fileName.substringBeforeLast(".")
val yamlTopicNames = topics["topics"]!!.toMap().map { it.value["name"] }
val yamlTopicNames = topics["topics"]!!.toMap().map { it.value["name"].toString() }
val kotlinTopicNames = memberMap[potentialClass]
assertThat(yamlTopicNames).containsExactlyInAnyOrderElementsOf(kotlinTopicNames)
assertThat(kotlinTopicNames).containsAll(yamlTopicNames)
}
}
}