From 203634e53ed8f5281c0fb3785bc98595123d4281 Mon Sep 17 00:00:00 2001 From: Kousuke Saruta Date: Thu, 25 Sep 2014 18:04:32 +0900 Subject: [PATCH] Modified comment in SchedulerBackend#applicationId and TaskScheduler#applicationId --- .../scala/org/apache/spark/scheduler/SchedulerBackend.scala | 6 ++++-- .../scala/org/apache/spark/scheduler/TaskScheduler.scala | 4 +++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/core/src/main/scala/org/apache/spark/scheduler/SchedulerBackend.scala b/core/src/main/scala/org/apache/spark/scheduler/SchedulerBackend.scala index a0be8307eff27..94ec34ba29a73 100644 --- a/core/src/main/scala/org/apache/spark/scheduler/SchedulerBackend.scala +++ b/core/src/main/scala/org/apache/spark/scheduler/SchedulerBackend.scala @@ -34,9 +34,11 @@ private[spark] trait SchedulerBackend { /** * The application ID associated with the job, if any. + * It is expected that the subclasses of TaskScheduler or SchedulerBackend + * override this method and return an unique application ID. * - * @return The application ID, or None if the backend does not provide an ID. + * @return The application ID, if the backend does not provide an ID. */ - def applicationId(): Option[String] = None + def applicationId(): String = System.currentTimeMillis.toString } diff --git a/core/src/main/scala/org/apache/spark/scheduler/TaskScheduler.scala b/core/src/main/scala/org/apache/spark/scheduler/TaskScheduler.scala index 5006c210a1187..aab6e0ec44025 100644 --- a/core/src/main/scala/org/apache/spark/scheduler/TaskScheduler.scala +++ b/core/src/main/scala/org/apache/spark/scheduler/TaskScheduler.scala @@ -67,8 +67,10 @@ private[spark] trait TaskScheduler { /** * The application ID associated with the job, if any. + * It is expected that the subclasses of TaskScheduler or SchedulerBackend + * override this method and return an unique application ID. * - * @return The application ID, or None if the backend does not provide an ID. + * @return The application ID, if the backend does not provide an ID. */ def applicationId(): String = System.currentTimeMillis.toString