flink-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From u..@apache.org
Subject [1/2] flink git commit: [jobmanager] Fix indentation
Date Wed, 23 Sep 2015 20:07:01 GMT
Repository: flink
Updated Branches:
  refs/heads/master 717d54c82 -> bc21de2e4


[jobmanager] Fix indentation


Project: http://git-wip-us.apache.org/repos/asf/flink/repo
Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/3c08eec9
Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/3c08eec9
Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/3c08eec9

Branch: refs/heads/master
Commit: 3c08eec954b0f891e160be6f60069489220bd980
Parents: 717d54c
Author: Ufuk Celebi <uce@apache.org>
Authored: Wed Sep 23 22:04:59 2015 +0200
Committer: Ufuk Celebi <uce@apache.org>
Committed: Wed Sep 23 22:05:08 2015 +0200

----------------------------------------------------------------------
 .../flink/runtime/jobmanager/JobManager.scala   | 47 +++++++++++---------
 1 file changed, 25 insertions(+), 22 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/3c08eec9/flink-runtime/src/main/scala/org/apache/flink/runtime/jobmanager/JobManager.scala
----------------------------------------------------------------------
diff --git a/flink-runtime/src/main/scala/org/apache/flink/runtime/jobmanager/JobManager.scala
b/flink-runtime/src/main/scala/org/apache/flink/runtime/jobmanager/JobManager.scala
index 444ab0b..07a5977 100644
--- a/flink-runtime/src/main/scala/org/apache/flink/runtime/jobmanager/JobManager.scala
+++ b/flink-runtime/src/main/scala/org/apache/flink/runtime/jobmanager/JobManager.scala
@@ -383,7 +383,7 @@ class JobManager(
             jobInfo.end = timeStamp
 
             // is the client waiting for the job result?
-            if(jobInfo.client != ActorRef.noSender) {
+            if (jobInfo.client != ActorRef.noSender) {
               newJobStatus match {
                 case JobStatus.FINISHED =>
                   val accumulatorResults: java.util.Map[String, SerializedValue[AnyRef]]
= try {
@@ -391,44 +391,47 @@ class JobManager(
                   } catch {
                     case e: Exception =>
                       log.error(s"Cannot fetch final accumulators for job $jobID", e)
+
                       val exception = new JobExecutionException(jobID,
                         "Failed to retrieve accumulator results.", e)
+
                       jobInfo.client ! decorateMessage(JobResultFailure(
                         new SerializedThrowable(exception)))
+
                       Collections.emptyMap()
                   }
-                val result = new SerializedJobExecutionResult(
-                  jobID,
-                  jobInfo.duration,
-                  accumulatorResults)
+
+                  val result = new SerializedJobExecutionResult(
+                    jobID,
+                    jobInfo.duration,
+                    accumulatorResults)
                   jobInfo.client ! decorateMessage(JobResultSuccess(result))
 
                 case JobStatus.CANCELED =>
-                // the error may be packed as a serialized throwable
-                val unpackedError = SerializedThrowable.get(
-                  error, executionGraph.getUserClassLoader())
-                
-                jobInfo.client ! decorateMessage(JobResultFailure(
-                  new SerializedThrowable(
-                    new JobCancellationException(jobID, "Job was cancelled.", unpackedError))))
+                  // the error may be packed as a serialized throwable
+                  val unpackedError = SerializedThrowable.get(
+                    error, executionGraph.getUserClassLoader())
+
+                  jobInfo.client ! decorateMessage(JobResultFailure(
+                    new SerializedThrowable(
+                      new JobCancellationException(jobID, "Job was cancelled.", unpackedError))))
 
                 case JobStatus.FAILED =>
-                val unpackedError = SerializedThrowable.get(
-                  error, executionGraph.getUserClassLoader())
-                
-                jobInfo.client ! decorateMessage(JobResultFailure(
-                  new SerializedThrowable(
-                    new JobExecutionException(jobID, "Job execution failed.", unpackedError))))
+                  val unpackedError = SerializedThrowable.get(
+                    error, executionGraph.getUserClassLoader())
+
+                  jobInfo.client ! decorateMessage(JobResultFailure(
+                    new SerializedThrowable(
+                      new JobExecutionException(jobID, "Job execution failed.", unpackedError))))
 
                 case x =>
-                val exception = new JobExecutionException(jobID, s"$x is not a terminal state.")
-                jobInfo.client ! decorateMessage(JobResultFailure(
-                  new SerializedThrowable(exception)))
+                  val exception = new JobExecutionException(jobID, s"$x is not a terminal
state.")
+                  jobInfo.client ! decorateMessage(JobResultFailure(
+                    new SerializedThrowable(exception)))
                   throw exception
               }
             }
 
-
             if (jobInfo.sessionAlive) {
               jobInfo.setLastActive()
               val lastActivity = jobInfo.lastActive


Mime
View raw message