[ 
https://issues.apache.org/jira/browse/FLINK-6043?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16040782#comment-16040782
 ] 

ASF GitHub Bot commented on FLINK-6043:
---------------------------------------

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

    https://github.com/apache/flink/pull/3583#discussion_r120610177
  
    --- Diff: 
flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/ErrorInfo.java
 ---
    @@ -0,0 +1,84 @@
    +/*
    + * 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.flink.runtime.executiongraph;
    +
    +import org.apache.flink.util.ExceptionUtils;
    +import org.apache.flink.util.Preconditions;
    +
    +import java.io.IOException;
    +import java.io.ObjectOutputStream;
    +import java.io.Serializable;
    +
    +/**
    + * Simple container to hold an exception and the corresponding timestamp.
    + */
    +public class ErrorInfo implements Serializable {
    +
    +   private static final long serialVersionUID = -6138942031953594202L;
    +
    +   private final transient Throwable exception;
    +   private final long timestamp;
    +
    +   private volatile String exceptionAsString;
    +
    +   public ErrorInfo(Throwable exception, long timestamp) {
    +           Preconditions.checkNotNull(exception);
    +           Preconditions.checkArgument(timestamp > 0);
    +
    +           this.exception = exception;
    +           this.timestamp = timestamp;
    +   }
    +
    +   /**
    +    * Returns the contained exception.
    +    *
    +    * @return contained exception, or null if no exception was set yet
    --- End diff --
    
    good idea.


> Display time when exceptions/root cause of failure happened
> -----------------------------------------------------------
>
>                 Key: FLINK-6043
>                 URL: https://issues.apache.org/jira/browse/FLINK-6043
>             Project: Flink
>          Issue Type: Improvement
>          Components: Webfrontend
>    Affects Versions: 1.3.0
>            Reporter: Till Rohrmann
>            Assignee: Chesnay Schepler
>            Priority: Minor
>
> In order to better understand the behaviour of Flink jobs, it would be nice 
> to add timestamp information to exception causing the job to restart or to 
> fail. This information could then be displayed in the web UI making it easier 
> for the user to understand what happened when.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to