You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@samza.apache.org by GitBox <gi...@apache.org> on 2019/05/30 19:18:06 UTC

[GitHub] [samza] mynameborat commented on a change in pull request #1047: SAMZA-2210: Initial majority migration for injecting classloader when doing reflection

mynameborat commented on a change in pull request #1047: SAMZA-2210: Initial majority migration for injecting classloader when doing reflection 
URL: https://github.com/apache/samza/pull/1047#discussion_r289128797
 
 

 ##########
 File path: samza-core/src/main/scala/org/apache/samza/coordinator/JobModelManager.scala
 ##########
 @@ -288,15 +290,16 @@ object JobModelManager extends Logging {
     * @param streamMetadataCache required to query the partition metadata of the input streams.
     * @return the input SystemStreamPartitions of the job.
     */
-  private def getMatchedInputStreamPartitions(config: Config, streamMetadataCache: StreamMetadataCache): Set[SystemStreamPartition] = {
+  private def getMatchedInputStreamPartitions(config: Config, streamMetadataCache: StreamMetadataCache,
+    classLoader: ClassLoader): Set[SystemStreamPartition] = {
     val allSystemStreamPartitions = getInputStreamPartitions(config, streamMetadataCache)
     config.getSSPMatcherClass match {
       case Some(s) =>
         val jfr = config.getSSPMatcherConfigJobFactoryRegex.r
         config.getStreamJobFactoryClass match {
           case Some(jfr(_*)) =>
             info("before match: allSystemStreamPartitions.size = %s" format allSystemStreamPartitions.size)
-            val sspMatcher = Util.getObj(s, classOf[SystemStreamPartitionMatcher])
+            val sspMatcher = ReflectionUtil.getObj(classLoader, s, classOf[SystemStreamPartitionMatcher])
 
 Review comment:
   not related to your change, but since there are some reorgs/clean up, can we also change the variable `s` to something meaningful?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services