You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by tillrohrmann <gi...@git.apache.org> on 2017/05/23 13:46:48 UTC

[GitHub] flink pull request #3972: [FLINK-6662] [errMsg] Improve error message if rec...

GitHub user tillrohrmann opened a pull request:

    https://github.com/apache/flink/pull/3972

    [FLINK-6662] [errMsg] Improve error message if recovery from RetrievableStateHandles fails

    When recovering state from a ZooKeeperStateHandleStore it can happen that the deserialization
    fails, because one tries to recover state from an old Flink version which is not compatible.
    In this case we should output a better error message such that the user can easily spot the
    problem.


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/tillrohrmann/flink improveErrorMessages

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/flink/pull/3972.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #3972
    
----
commit 31d099c4768f1ee8dfbecfd8eddc6f05842425e6
Author: Till Rohrmann <tr...@apache.org>
Date:   2017-05-23T13:42:38Z

    [FLINK-6662] [errMsg] Improve error message if recovery from RetrievableStateHandles fails
    
    When recovering state from a ZooKeeperStateHandleStore it can happen that the deserialization
    fails, because one tries to recover state from an old Flink version which is not compatible.
    In this case we should output a better error message such that the user can easily spot the
    problem.

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request #3972: [FLINK-6662] [errMsg] Improve error message if rec...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/flink/pull/3972


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request #3972: [FLINK-6662] [errMsg] Improve error message if rec...

Posted by tillrohrmann <gi...@git.apache.org>.
Github user tillrohrmann commented on a diff in the pull request:

    https://github.com/apache/flink/pull/3972#discussion_r118068470
  
    --- Diff: flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/ZooKeeperCompletedCheckpointStore.java ---
    @@ -376,8 +377,14 @@ private static CompletedCheckpoint retrieveCompletedCheckpoint(Tuple2<Retrievabl
     
     		try {
     			return stateHandlePath.f0.retrieveState();
    -		} catch (Exception e) {
    -			throw new FlinkException("Could not retrieve checkpoint " + checkpointId + ". The state handle seems to be broken.", e);
    +		} catch (ClassNotFoundException cnfe) {
    +			throw new FlinkException("Could not retrieve checkpoint " + checkpointId + " from state handle under " +
    +				stateHandlePath.f1 + ". This indicates that you are trying to recover from state written by an " +
    +				"older Flink version which is not compatible. Try cleaning the state handle store.", cnfe);
    +		} catch (IOException ioe) {
    +			throw new FlinkException("Could not retrieve " + checkpointId + " worker from state handle under " +
    --- End diff --
    
    Yes, a copy & paste error from my side. I will correct it.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request #3972: [FLINK-6662] [errMsg] Improve error message if rec...

Posted by zentol <gi...@git.apache.org>.
Github user zentol commented on a diff in the pull request:

    https://github.com/apache/flink/pull/3972#discussion_r118026253
  
    --- Diff: flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/ZooKeeperCompletedCheckpointStore.java ---
    @@ -376,8 +377,14 @@ private static CompletedCheckpoint retrieveCompletedCheckpoint(Tuple2<Retrievabl
     
     		try {
     			return stateHandlePath.f0.retrieveState();
    -		} catch (Exception e) {
    -			throw new FlinkException("Could not retrieve checkpoint " + checkpointId + ". The state handle seems to be broken.", e);
    +		} catch (ClassNotFoundException cnfe) {
    +			throw new FlinkException("Could not retrieve checkpoint " + checkpointId + " from state handle under " +
    +				stateHandlePath.f1 + ". This indicates that you are trying to recover from state written by an " +
    +				"older Flink version which is not compatible. Try cleaning the state handle store.", cnfe);
    +		} catch (IOException ioe) {
    +			throw new FlinkException("Could not retrieve " + checkpointId + " worker from state handle under " +
    --- End diff --
    
    shouldn't this say `Could not retrieve checkpoint " + checkpointId + " from state handle under` like in case of an CNFE?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink issue #3972: [FLINK-6662] [errMsg] Improve error message if recovery f...

Posted by tillrohrmann <gi...@git.apache.org>.
Github user tillrohrmann commented on the issue:

    https://github.com/apache/flink/pull/3972
  
    Thanks for the review @zentol.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---