rmatharu commented on a change in pull request #1241: SAMZA-2424: AM should
cache and serve serialized Job Model to containers
URL: https://github.com/apache/samza/pull/1241#discussion_r362583103
##########
File path:
samza-core/src/main/scala/org/apache/samza/coordinator/JobModelManager.scala
##########
@@ -93,15 +94,17 @@ object JobModelManager extends Logging {
val streamMetadataCache = new StreamMetadataCache(systemAdmins, 0)
val grouperMetadata: GrouperMetadata = getGrouperMetadata(config,
localityManager, taskAssignmentManager, taskPartitionAssignmentManager)
- val jobModel: JobModel = readJobModel(config, changelogPartitionMapping,
streamMetadataCache, grouperMetadata)
- jobModelRef.set(new JobModel(jobModel.getConfig, jobModel.getContainers,
localityManager))
+ val jobModel = readJobModel(config, changelogPartitionMapping,
streamMetadataCache, grouperMetadata)
+ val jobModelToServe = new JobModel(jobModel.getConfig,
jobModel.getContainers, localityManager)
+ val serializedJobModelToServe =
SamzaObjectMapper.getObjectMapper().writeValueAsBytes(jobModelToServe)
+ jobModelRef.set(serializedJobModelToServe)
Review comment:
Maybe serializedJobModelRef ?
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services