flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GJL <...@git.apache.org>
Subject [GitHub] flink pull request #5703: [FLINK-8915] CheckpointingStatisticsHandler fails ...
Date Fri, 16 Mar 2018 15:30:27 GMT
Github user GJL commented on a diff in the pull request:

    https://github.com/apache/flink/pull/5703#discussion_r175126066
  
    --- Diff: flink-runtime/src/main/java/org/apache/flink/runtime/rest/messages/checkpoints/CheckpointStatistics.java
---
    @@ -273,7 +274,21 @@ public static CheckpointStatistics generateCheckpointStatistics(AbstractCheckpoi
     				failedCheckpointStats.getFailureTimestamp(),
     				failedCheckpointStats.getFailureMessage());
     		} else {
    -			throw new IllegalArgumentException("Given checkpoint stats object of type " + checkpointStats.getClass().getName()
+ " cannot be converted.");
    +			final PendingCheckpointStats pendingCheckpointStats = ((PendingCheckpointStats) checkpointStats);
    --- End diff --
    
    The original `else` block should be kept in case the class hierarchy is extended.
    ```
    else if (checkpointStats instanceOf PendingCheckpointStats) {
        ...
    } else {
        throw new IllegalArgumentException("Given checkpoint stats object of type " + checkpointStats.getClass().getName()
+ " cannot be converted.");
    }
    ```


---

Mime
View raw message