flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mxm <...@git.apache.org>
Subject [GitHub] flink pull request: [FLINK-2371] improve AccumulatorLiveITCase
Date Tue, 21 Jul 2015 08:37:37 GMT
Github user mxm commented on a diff in the pull request:

    https://github.com/apache/flink/pull/925#discussion_r35080374
  
    --- Diff: flink-runtime/src/main/scala/org/apache/flink/runtime/jobmanager/JobManager.scala
---
    @@ -400,20 +400,16 @@ class JobManager(
           import scala.collection.JavaConverters._
           sender ! RegisteredTaskManagers(instanceManager.getAllRegisteredInstances.asScala)
     
    -    case Heartbeat(instanceID, metricsReport, accumulators) =>
    +    case Heartbeat(instanceID, metricsReport, accumulators, asyncAccumulatorUpdate) =>
           log.debug(s"Received hearbeat message from $instanceID.")
     
    -      Future {
    -        accumulators foreach {
    -          case accumulators =>
    -              currentJobs.get(accumulators.getJobID) match {
    -                case Some((jobGraph, jobInfo)) =>
    -                  jobGraph.updateAccumulators(accumulators)
    -                case None =>
    -                  // ignore accumulator values for old job
    -              }
    -        }
    -      }(context.dispatcher)
    +      if (asyncAccumulatorUpdate) {
    --- End diff --
    
    Thanks, I was looking for a way to make the future synchronous for my test setup. I will
look into `CallingThreadDispatcher`. I'm already overwriting this message in `TestingJobManager`
but then I would have to insert duplicate code there :)


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message