flink-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From u..@apache.org
Subject flink git commit: [FLINK-2224] Log error cause in JobStatusChange
Date Mon, 15 Jun 2015 15:23:38 GMT
Repository: flink
Updated Branches:
  refs/heads/master 5317a1e5b -> b14ec1754


[FLINK-2224] Log error cause in JobStatusChange


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

Branch: refs/heads/master
Commit: b14ec1754e218a1edf45e0513e6c90ba00d09280
Parents: 5317a1e
Author: Ufuk Celebi <uce@apache.org>
Authored: Mon Jun 15 17:22:38 2015 +0200
Committer: Ufuk Celebi <uce@apache.org>
Committed: Mon Jun 15 17:23:31 2015 +0200

----------------------------------------------------------------------
 .../src/main/resources/log4j-test.properties                | 6 +++++-
 .../org/apache/flink/runtime/jobmanager/JobManager.scala    | 9 ++++-----
 2 files changed, 9 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/b14ec175/flink-examples/flink-java-examples/src/main/resources/log4j-test.properties
----------------------------------------------------------------------
diff --git a/flink-examples/flink-java-examples/src/main/resources/log4j-test.properties b/flink-examples/flink-java-examples/src/main/resources/log4j-test.properties
index 2fb9345..65bd0b8 100644
--- a/flink-examples/flink-java-examples/src/main/resources/log4j-test.properties
+++ b/flink-examples/flink-java-examples/src/main/resources/log4j-test.properties
@@ -16,4 +16,8 @@
 # limitations under the License.
 ################################################################################
 
-log4j.rootLogger=OFF
\ No newline at end of file
+log4j.rootLogger=INFO, console
+
+log4j.appender.console=org.apache.log4j.ConsoleAppender
+log4j.appender.console.layout=org.apache.log4j.PatternLayout
+log4j.appender.console.layout.ConversionPattern=%d{HH:mm:ss,SSS} %-5p %-60c %x - %m%n
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flink/blob/b14ec175/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 d5df633..c917d4a 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
@@ -30,14 +30,12 @@ import org.apache.flink.core.io.InputSplitAssigner
 import org.apache.flink.runtime.accumulators.StringifiedAccumulatorResult
 import org.apache.flink.runtime.blob.BlobServer
 import org.apache.flink.runtime.client._
-import org.apache.flink.runtime.execution.ExecutionState
 import org.apache.flink.runtime.executiongraph.{ExecutionJobVertex, ExecutionGraph}
 import org.apache.flink.runtime.jobmanager.web.WebInfoServer
 import org.apache.flink.runtime.messages.ArchiveMessages.ArchiveExecutionGraph
 import org.apache.flink.runtime.messages.ExecutionGraphMessages.JobStatusChanged
 import org.apache.flink.runtime.messages.Messages.{Disconnect, Acknowledge}
-import org.apache.flink.runtime.messages.TaskMessages
-import org.apache.flink.runtime.messages.TaskMessages.{FailTask, PartitionState, UpdateTaskExecutionState}
+import org.apache.flink.runtime.messages.TaskMessages.{PartitionState, UpdateTaskExecutionState}
 import org.apache.flink.runtime.messages.accumulators._
 import org.apache.flink.runtime.messages.checkpoint.{AcknowledgeCheckpoint, AbstractCheckpointMessage}
 import org.apache.flink.runtime.process.ProcessReaper
@@ -287,8 +285,9 @@ class JobManager(protected val flinkConfiguration: Configuration,
     case JobStatusChanged(jobID, newJobStatus, timeStamp, error) =>
       currentJobs.get(jobID) match {
         case Some((executionGraph, jobInfo)) => executionGraph.getJobName
-          log.info(s"Status of job $jobID (${executionGraph.getJobName}) changed to $newJobStatus"
+
-            s" ${if (error == null) "" else error.getMessage}.")
+
+          log.info(s"Status of job $jobID (${executionGraph.getJobName}) changed to $newJobStatus.",
+            error)
 
           if (newJobStatus.isTerminalState) {
             jobInfo.end = timeStamp


Mime
View raw message