Return-Path: X-Original-To: apmail-spark-reviews-archive@minotaur.apache.org Delivered-To: apmail-spark-reviews-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3F7C711696 for ; Mon, 14 Jul 2014 05:28:18 +0000 (UTC) Received: (qmail 60833 invoked by uid 500); 14 Jul 2014 05:28:18 -0000 Delivered-To: apmail-spark-reviews-archive@spark.apache.org Received: (qmail 60814 invoked by uid 500); 14 Jul 2014 05:28:18 -0000 Mailing-List: contact reviews-help@spark.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: reviews@spark.apache.org Delivered-To: mailing list reviews@spark.apache.org Received: (qmail 60800 invoked by uid 99); 14 Jul 2014 05:28:17 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 14 Jul 2014 05:28:17 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 64C4C8BD1DF; Mon, 14 Jul 2014 05:28:17 +0000 (UTC) From: andrewor14 To: reviews@spark.apache.org Reply-To: reviews@spark.apache.org References: In-Reply-To: Subject: [GitHub] spark pull request: SPARK-2099. Report progress while task is runn... Content-Type: text/plain Message-Id: <20140714052817.64C4C8BD1DF@tyr.zones.apache.org> Date: Mon, 14 Jul 2014 05:28:17 +0000 (UTC) Github user andrewor14 commented on a diff in the pull request: https://github.com/apache/spark/pull/1056#discussion_r14864946 --- Diff: core/src/main/scala/org/apache/spark/HeartbeatReceiver.scala --- @@ -0,0 +1,33 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.spark + +import akka.actor.Actor +import org.apache.spark.executor.TaskMetrics +import org.apache.spark.storage.BlockManagerId +import org.apache.spark.scheduler.TaskScheduler + +case class Heartbeat(executorId: String, taskMetrics: Array[(Long, TaskMetrics)], + blockManagerId: BlockManagerId) extends Serializable + +class HeartbeatReceiver(scheduler: TaskScheduler) extends Actor { + override def receive = { + case Heartbeat(executorId, taskMetrics, blockManagerId) => + sender ! scheduler.executorHeartbeat(executorId, taskMetrics, blockManagerId) --- End diff -- Looks like `HeartbeatReceiver` can only exist on the driver (because it tasked in a scheduler). Then I don't see why we can't just call `blockManagerMaster.heartBeat(...)` (and we should rename this from `heartBeat`) directly rather than having to go through another akka exchange. --- 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. ---