Github user andrewor14 commented on a diff in the pull request:

    https://github.com/apache/spark/pull/5144#discussion_r28462943
  
    --- Diff: 
core/src/main/scala/org/apache/spark/scheduler/cluster/mesos/MesosClusterScheduler.scala
 ---
    @@ -0,0 +1,614 @@
    +/*
    + * 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.scheduler.cluster.mesos
    +
    +import java.io.File
    +import java.util.concurrent.locks.ReentrantLock
    +import java.util.{Collections, Date, List => JList}
    +
    +import org.apache.mesos.Protos.Environment.Variable
    +import org.apache.mesos.Protos.TaskStatus.Reason
    +import org.apache.mesos.Protos.{TaskState => MesosTaskState, _}
    +import org.apache.mesos.{Scheduler, SchedulerDriver}
    +import org.apache.spark.deploy.mesos.MesosDriverDescription
    +import org.apache.spark.deploy.rest.{CreateSubmissionResponse, 
KillSubmissionResponse, SubmissionStatusResponse}
    +import org.apache.spark.metrics.MetricsSystem
    +import org.apache.spark.util.Utils
    +import org.apache.spark.{SecurityManager, SparkConf, SparkException, 
TaskState}
    +
    +import scala.collection.JavaConversions._
    +import scala.collection.mutable
    +import scala.collection.mutable.ArrayBuffer
    +
    +
    +/**
    + * Tracks the current state of a Mesos Task that runs a Spark driver.
    + * @param submission Submitted driver description from
    + *                   [[org.apache.spark.deploy.rest.mesos.MesosRestServer]]
    + * @param taskId Mesos TaskID generated for the task
    + * @param slaveId Slave ID that the task is assigned to
    + * @param taskState The last known task status update.
    + * @param startDate The date the task was launched
    + */
    +private[spark] class MesosClusterTaskState(
    +    val submission: MesosDriverDescription,
    +    val taskId: TaskID,
    +    val slaveId: SlaveID,
    +    var taskState: Option[TaskStatus],
    +    var startDate: Date)
    +  extends Serializable {
    +
    +  def copy(): MesosClusterTaskState = {
    +    new MesosClusterTaskState(
    +      submission, taskId, slaveId, taskState, startDate)
    +  }
    +}
    +
    +/**
    + * Tracks the retry state of a driver, which includes the next time it 
should be scheduled
    + * and necessary information to do exponential backoff.
    + * This class is not thread-safe, and we expect the caller to handle 
synchronizing state.
    + * @param lastFailureStatus Last Task status when it failed.
    + * @param retries Number of times it has retried.
    --- End diff --
    
    has been


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to