[jira] [Commented] (FLINK-9356) Improve error message for when queryable state not ready / reachable

2018-05-29 Thread ASF GitHub Bot (JIRA)


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

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

Github user asfgit closed the pull request at:

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


> Improve error message for when queryable state not ready / reachable
> 
>
> Key: FLINK-9356
> URL: https://issues.apache.org/jira/browse/FLINK-9356
> Project: Flink
>  Issue Type: Improvement
>  Components: Queryable State
>Affects Versions: 1.5.0
>Reporter: Florian Schmidt
>Assignee: vinoyang
>Priority: Major
>
> When executing the queryable state client and either
> a. The queryable state is not ready
> b. There is no job with the specified job-id
>  
> one sees the following exception:
>  
> {code:java}
> Exception in thread "main" java.util.concurrent.ExecutionException: 
> java.lang.RuntimeException: Failed request 0.
>  Caused by: 
> org.apache.flink.queryablestate.exceptions.UnknownLocationException: Could 
> not contact the state location oracle to retrieve the state location.
>  at 
> org.apache.flink.queryablestate.client.proxy.KvStateClientProxyHandler.getKvStateLookupInfo(KvStateClientProxyHandler.java:228)
>  at 
> org.apache.flink.queryablestate.client.proxy.KvStateClientProxyHandler.getState(KvStateClientProxyHandler.java:162)
>  at 
> org.apache.flink.queryablestate.client.proxy.KvStateClientProxyHandler.executeActionAsync(KvStateClientProxyHandler.java:129)
>  at 
> org.apache.flink.queryablestate.client.proxy.KvStateClientProxyHandler.handleRequest(KvStateClientProxyHandler.java:119)
>  at 
> org.apache.flink.queryablestate.client.proxy.KvStateClientProxyHandler.handleRequest(KvStateClientProxyHandler.java:63)
>  at 
> org.apache.flink.queryablestate.network.AbstractServerHandler$AsyncRequestTask.run(AbstractServerHandler.java:236)
>  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
>  at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>  at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>  at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>  at java.lang.Thread.run(Thread.java:748)
> at 
> java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357)
>  at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1895)
>  at 
> org.apache.flink.streaming.tests.queryablestate.QsStateClient.getMapState(QsStateClient.java:122)
>  at 
> org.apache.flink.streaming.tests.queryablestate.QsStateClient.main(QsStateClient.java:75)
> Caused by: java.lang.RuntimeException: Failed request 0.
>  Caused by: 
> org.apache.flink.queryablestate.exceptions.UnknownLocationException: Could 
> not contact the state location oracle to retrieve the state location.
>  at 
> org.apache.flink.queryablestate.client.proxy.KvStateClientProxyHandler.getKvStateLookupInfo(KvStateClientProxyHandler.java:228)
>  at 
> org.apache.flink.queryablestate.client.proxy.KvStateClientProxyHandler.getState(KvStateClientProxyHandler.java:162)
>  at 
> org.apache.flink.queryablestate.client.proxy.KvStateClientProxyHandler.executeActionAsync(KvStateClientProxyHandler.java:129)
>  at 
> org.apache.flink.queryablestate.client.proxy.KvStateClientProxyHandler.handleRequest(KvStateClientProxyHandler.java:119)
>  at 
> org.apache.flink.queryablestate.client.proxy.KvStateClientProxyHandler.handleRequest(KvStateClientProxyHandler.java:63)
>  at 
> org.apache.flink.queryablestate.network.AbstractServerHandler$AsyncRequestTask.run(AbstractServerHandler.java:236)
>  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
>  at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>  at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>  at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>  at java.lang.Thread.run(Thread.java:748)
> at 
> org.apache.flink.queryablestate.network.AbstractServerHandler$AsyncRequestTask.lambda$run$0(AbstractServerHandler.java:273)
>  at 
> java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:760)
>  at 
> java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(CompletableFuture.java:736)
>  at 
> java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:474)
>  at 
> java.util.concurrent.CompletableFuture.completeExceptionally(CompletableFuture.java:1977)
>  at 
> org.apache.flink.queryablestate.client.proxy.KvStateClientProxyHandler.lambda$executeActionAsync$0(KvStateClientProxyHandler.java:146)
>  at 
> java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:760)
>  at 
> 

[jira] [Commented] (FLINK-9356) Improve error message for when queryable state not ready / reachable

2018-05-29 Thread ASF GitHub Bot (JIRA)


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

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

Github user kl0u commented on the issue:

https://github.com/apache/flink/pull/6028
  
LGTM, so +1 and I will merge later. 
Thanks for the work @yanghua and for the review @florianschmidt1994 .


> Improve error message for when queryable state not ready / reachable
> 
>
> Key: FLINK-9356
> URL: https://issues.apache.org/jira/browse/FLINK-9356
> Project: Flink
>  Issue Type: Improvement
>  Components: Queryable State
>Affects Versions: 1.5.0
>Reporter: Florian Schmidt
>Assignee: vinoyang
>Priority: Major
>
> When executing the queryable state client and either
> a. The queryable state is not ready
> b. There is no job with the specified job-id
>  
> one sees the following exception:
>  
> {code:java}
> Exception in thread "main" java.util.concurrent.ExecutionException: 
> java.lang.RuntimeException: Failed request 0.
>  Caused by: 
> org.apache.flink.queryablestate.exceptions.UnknownLocationException: Could 
> not contact the state location oracle to retrieve the state location.
>  at 
> org.apache.flink.queryablestate.client.proxy.KvStateClientProxyHandler.getKvStateLookupInfo(KvStateClientProxyHandler.java:228)
>  at 
> org.apache.flink.queryablestate.client.proxy.KvStateClientProxyHandler.getState(KvStateClientProxyHandler.java:162)
>  at 
> org.apache.flink.queryablestate.client.proxy.KvStateClientProxyHandler.executeActionAsync(KvStateClientProxyHandler.java:129)
>  at 
> org.apache.flink.queryablestate.client.proxy.KvStateClientProxyHandler.handleRequest(KvStateClientProxyHandler.java:119)
>  at 
> org.apache.flink.queryablestate.client.proxy.KvStateClientProxyHandler.handleRequest(KvStateClientProxyHandler.java:63)
>  at 
> org.apache.flink.queryablestate.network.AbstractServerHandler$AsyncRequestTask.run(AbstractServerHandler.java:236)
>  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
>  at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>  at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>  at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>  at java.lang.Thread.run(Thread.java:748)
> at 
> java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357)
>  at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1895)
>  at 
> org.apache.flink.streaming.tests.queryablestate.QsStateClient.getMapState(QsStateClient.java:122)
>  at 
> org.apache.flink.streaming.tests.queryablestate.QsStateClient.main(QsStateClient.java:75)
> Caused by: java.lang.RuntimeException: Failed request 0.
>  Caused by: 
> org.apache.flink.queryablestate.exceptions.UnknownLocationException: Could 
> not contact the state location oracle to retrieve the state location.
>  at 
> org.apache.flink.queryablestate.client.proxy.KvStateClientProxyHandler.getKvStateLookupInfo(KvStateClientProxyHandler.java:228)
>  at 
> org.apache.flink.queryablestate.client.proxy.KvStateClientProxyHandler.getState(KvStateClientProxyHandler.java:162)
>  at 
> org.apache.flink.queryablestate.client.proxy.KvStateClientProxyHandler.executeActionAsync(KvStateClientProxyHandler.java:129)
>  at 
> org.apache.flink.queryablestate.client.proxy.KvStateClientProxyHandler.handleRequest(KvStateClientProxyHandler.java:119)
>  at 
> org.apache.flink.queryablestate.client.proxy.KvStateClientProxyHandler.handleRequest(KvStateClientProxyHandler.java:63)
>  at 
> org.apache.flink.queryablestate.network.AbstractServerHandler$AsyncRequestTask.run(AbstractServerHandler.java:236)
>  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
>  at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>  at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>  at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>  at java.lang.Thread.run(Thread.java:748)
> at 
> org.apache.flink.queryablestate.network.AbstractServerHandler$AsyncRequestTask.lambda$run$0(AbstractServerHandler.java:273)
>  at 
> java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:760)
>  at 
> java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(CompletableFuture.java:736)
>  at 
> java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:474)
>  at 
> java.util.concurrent.CompletableFuture.completeExceptionally(CompletableFuture.java:1977)
>  at 
> org.apache.flink.queryablestate.client.proxy.KvStateClientProxyHandler.lambda$executeActionAsync$0(KvStateClientProxyHandler.java:146)
>  at 
> 

[jira] [Commented] (FLINK-9356) Improve error message for when queryable state not ready / reachable

2018-05-29 Thread ASF GitHub Bot (JIRA)


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

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

Github user yanghua commented on the issue:

https://github.com/apache/flink/pull/6028
  
cc @kl0u @zentol 


> Improve error message for when queryable state not ready / reachable
> 
>
> Key: FLINK-9356
> URL: https://issues.apache.org/jira/browse/FLINK-9356
> Project: Flink
>  Issue Type: Improvement
>  Components: Queryable State
>Affects Versions: 1.5.0
>Reporter: Florian Schmidt
>Assignee: vinoyang
>Priority: Major
>
> When executing the queryable state client and either
> a. The queryable state is not ready
> b. There is no job with the specified job-id
>  
> one sees the following exception:
>  
> {code:java}
> Exception in thread "main" java.util.concurrent.ExecutionException: 
> java.lang.RuntimeException: Failed request 0.
>  Caused by: 
> org.apache.flink.queryablestate.exceptions.UnknownLocationException: Could 
> not contact the state location oracle to retrieve the state location.
>  at 
> org.apache.flink.queryablestate.client.proxy.KvStateClientProxyHandler.getKvStateLookupInfo(KvStateClientProxyHandler.java:228)
>  at 
> org.apache.flink.queryablestate.client.proxy.KvStateClientProxyHandler.getState(KvStateClientProxyHandler.java:162)
>  at 
> org.apache.flink.queryablestate.client.proxy.KvStateClientProxyHandler.executeActionAsync(KvStateClientProxyHandler.java:129)
>  at 
> org.apache.flink.queryablestate.client.proxy.KvStateClientProxyHandler.handleRequest(KvStateClientProxyHandler.java:119)
>  at 
> org.apache.flink.queryablestate.client.proxy.KvStateClientProxyHandler.handleRequest(KvStateClientProxyHandler.java:63)
>  at 
> org.apache.flink.queryablestate.network.AbstractServerHandler$AsyncRequestTask.run(AbstractServerHandler.java:236)
>  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
>  at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>  at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>  at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>  at java.lang.Thread.run(Thread.java:748)
> at 
> java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357)
>  at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1895)
>  at 
> org.apache.flink.streaming.tests.queryablestate.QsStateClient.getMapState(QsStateClient.java:122)
>  at 
> org.apache.flink.streaming.tests.queryablestate.QsStateClient.main(QsStateClient.java:75)
> Caused by: java.lang.RuntimeException: Failed request 0.
>  Caused by: 
> org.apache.flink.queryablestate.exceptions.UnknownLocationException: Could 
> not contact the state location oracle to retrieve the state location.
>  at 
> org.apache.flink.queryablestate.client.proxy.KvStateClientProxyHandler.getKvStateLookupInfo(KvStateClientProxyHandler.java:228)
>  at 
> org.apache.flink.queryablestate.client.proxy.KvStateClientProxyHandler.getState(KvStateClientProxyHandler.java:162)
>  at 
> org.apache.flink.queryablestate.client.proxy.KvStateClientProxyHandler.executeActionAsync(KvStateClientProxyHandler.java:129)
>  at 
> org.apache.flink.queryablestate.client.proxy.KvStateClientProxyHandler.handleRequest(KvStateClientProxyHandler.java:119)
>  at 
> org.apache.flink.queryablestate.client.proxy.KvStateClientProxyHandler.handleRequest(KvStateClientProxyHandler.java:63)
>  at 
> org.apache.flink.queryablestate.network.AbstractServerHandler$AsyncRequestTask.run(AbstractServerHandler.java:236)
>  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
>  at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>  at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>  at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>  at java.lang.Thread.run(Thread.java:748)
> at 
> org.apache.flink.queryablestate.network.AbstractServerHandler$AsyncRequestTask.lambda$run$0(AbstractServerHandler.java:273)
>  at 
> java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:760)
>  at 
> java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(CompletableFuture.java:736)
>  at 
> java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:474)
>  at 
> java.util.concurrent.CompletableFuture.completeExceptionally(CompletableFuture.java:1977)
>  at 
> org.apache.flink.queryablestate.client.proxy.KvStateClientProxyHandler.lambda$executeActionAsync$0(KvStateClientProxyHandler.java:146)
>  at 
> java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:760)
>  at 
> 

[jira] [Commented] (FLINK-9356) Improve error message for when queryable state not ready / reachable

2018-05-23 Thread ASF GitHub Bot (JIRA)

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

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

Github user yanghua commented on the issue:

https://github.com/apache/flink/pull/6028
  
cc @kl0u 


> Improve error message for when queryable state not ready / reachable
> 
>
> Key: FLINK-9356
> URL: https://issues.apache.org/jira/browse/FLINK-9356
> Project: Flink
>  Issue Type: Improvement
>  Components: Queryable State
>Affects Versions: 1.5.0
>Reporter: Florian Schmidt
>Assignee: vinoyang
>Priority: Major
>
> When executing the queryable state client and either
> a. The queryable state is not ready
> b. There is no job with the specified job-id
>  
> one sees the following exception:
>  
> {code:java}
> Exception in thread "main" java.util.concurrent.ExecutionException: 
> java.lang.RuntimeException: Failed request 0.
>  Caused by: 
> org.apache.flink.queryablestate.exceptions.UnknownLocationException: Could 
> not contact the state location oracle to retrieve the state location.
>  at 
> org.apache.flink.queryablestate.client.proxy.KvStateClientProxyHandler.getKvStateLookupInfo(KvStateClientProxyHandler.java:228)
>  at 
> org.apache.flink.queryablestate.client.proxy.KvStateClientProxyHandler.getState(KvStateClientProxyHandler.java:162)
>  at 
> org.apache.flink.queryablestate.client.proxy.KvStateClientProxyHandler.executeActionAsync(KvStateClientProxyHandler.java:129)
>  at 
> org.apache.flink.queryablestate.client.proxy.KvStateClientProxyHandler.handleRequest(KvStateClientProxyHandler.java:119)
>  at 
> org.apache.flink.queryablestate.client.proxy.KvStateClientProxyHandler.handleRequest(KvStateClientProxyHandler.java:63)
>  at 
> org.apache.flink.queryablestate.network.AbstractServerHandler$AsyncRequestTask.run(AbstractServerHandler.java:236)
>  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
>  at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>  at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>  at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>  at java.lang.Thread.run(Thread.java:748)
> at 
> java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357)
>  at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1895)
>  at 
> org.apache.flink.streaming.tests.queryablestate.QsStateClient.getMapState(QsStateClient.java:122)
>  at 
> org.apache.flink.streaming.tests.queryablestate.QsStateClient.main(QsStateClient.java:75)
> Caused by: java.lang.RuntimeException: Failed request 0.
>  Caused by: 
> org.apache.flink.queryablestate.exceptions.UnknownLocationException: Could 
> not contact the state location oracle to retrieve the state location.
>  at 
> org.apache.flink.queryablestate.client.proxy.KvStateClientProxyHandler.getKvStateLookupInfo(KvStateClientProxyHandler.java:228)
>  at 
> org.apache.flink.queryablestate.client.proxy.KvStateClientProxyHandler.getState(KvStateClientProxyHandler.java:162)
>  at 
> org.apache.flink.queryablestate.client.proxy.KvStateClientProxyHandler.executeActionAsync(KvStateClientProxyHandler.java:129)
>  at 
> org.apache.flink.queryablestate.client.proxy.KvStateClientProxyHandler.handleRequest(KvStateClientProxyHandler.java:119)
>  at 
> org.apache.flink.queryablestate.client.proxy.KvStateClientProxyHandler.handleRequest(KvStateClientProxyHandler.java:63)
>  at 
> org.apache.flink.queryablestate.network.AbstractServerHandler$AsyncRequestTask.run(AbstractServerHandler.java:236)
>  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
>  at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>  at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>  at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>  at java.lang.Thread.run(Thread.java:748)
> at 
> org.apache.flink.queryablestate.network.AbstractServerHandler$AsyncRequestTask.lambda$run$0(AbstractServerHandler.java:273)
>  at 
> java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:760)
>  at 
> java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(CompletableFuture.java:736)
>  at 
> java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:474)
>  at 
> java.util.concurrent.CompletableFuture.completeExceptionally(CompletableFuture.java:1977)
>  at 
> org.apache.flink.queryablestate.client.proxy.KvStateClientProxyHandler.lambda$executeActionAsync$0(KvStateClientProxyHandler.java:146)
>  at 
> java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:760)
>  at 
> 

[jira] [Commented] (FLINK-9356) Improve error message for when queryable state not ready / reachable

2018-05-22 Thread ASF GitHub Bot (JIRA)

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

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

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

https://github.com/apache/flink/pull/6028#discussion_r189943667
  
--- Diff: 
flink-queryable-state/flink-queryable-state-runtime/src/main/java/org/apache/flink/queryablestate/client/proxy/KvStateClientProxyHandler.java
 ---
@@ -225,7 +225,9 @@ private void executeActionAsync(
 
return location;
} else {
-   return FutureUtils.completedExceptionally(new 
UnknownLocationException("Could not contact the state location oracle to 
retrieve the state location."));
+   return FutureUtils.completedExceptionally(
+   new UnknownLocationException("Could not contact 
the state location oracle to retrieve the state location for state="
+   + queryableStateName + " of job=" + 
jobId + ", the caused reason maybe the state is not ready or there is no job 
exists."));
--- End diff --

@florianschmidt1994 thanks for your opinion
 for 1 : here the thrown error message is based on

`   final KvStateLocationOracle kvStateLocationOracle = 
proxy.getKvStateLocationOracle(jobId);
`

if `kvStateLocationOracle` is null will throw the exception, but just 
depends this variable, we could not give a explicit reason, I think giving the 
possibility is good, the explicit reason should been given in the 
implementation of method `getKvStateLocationOracle` or others (but not belongs 
this issue).

for 2 : accept your idea, we cold remove the **oracle** keyword


> Improve error message for when queryable state not ready / reachable
> 
>
> Key: FLINK-9356
> URL: https://issues.apache.org/jira/browse/FLINK-9356
> Project: Flink
>  Issue Type: Improvement
>  Components: Queryable State
>Affects Versions: 1.5.0
>Reporter: Florian Schmidt
>Assignee: vinoyang
>Priority: Major
>
> When executing the queryable state client and either
> a. The queryable state is not ready
> b. There is no job with the specified job-id
>  
> one sees the following exception:
>  
> {code:java}
> Exception in thread "main" java.util.concurrent.ExecutionException: 
> java.lang.RuntimeException: Failed request 0.
>  Caused by: 
> org.apache.flink.queryablestate.exceptions.UnknownLocationException: Could 
> not contact the state location oracle to retrieve the state location.
>  at 
> org.apache.flink.queryablestate.client.proxy.KvStateClientProxyHandler.getKvStateLookupInfo(KvStateClientProxyHandler.java:228)
>  at 
> org.apache.flink.queryablestate.client.proxy.KvStateClientProxyHandler.getState(KvStateClientProxyHandler.java:162)
>  at 
> org.apache.flink.queryablestate.client.proxy.KvStateClientProxyHandler.executeActionAsync(KvStateClientProxyHandler.java:129)
>  at 
> org.apache.flink.queryablestate.client.proxy.KvStateClientProxyHandler.handleRequest(KvStateClientProxyHandler.java:119)
>  at 
> org.apache.flink.queryablestate.client.proxy.KvStateClientProxyHandler.handleRequest(KvStateClientProxyHandler.java:63)
>  at 
> org.apache.flink.queryablestate.network.AbstractServerHandler$AsyncRequestTask.run(AbstractServerHandler.java:236)
>  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
>  at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>  at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>  at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>  at java.lang.Thread.run(Thread.java:748)
> at 
> java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357)
>  at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1895)
>  at 
> org.apache.flink.streaming.tests.queryablestate.QsStateClient.getMapState(QsStateClient.java:122)
>  at 
> org.apache.flink.streaming.tests.queryablestate.QsStateClient.main(QsStateClient.java:75)
> Caused by: java.lang.RuntimeException: Failed request 0.
>  Caused by: 
> org.apache.flink.queryablestate.exceptions.UnknownLocationException: Could 
> not contact the state location oracle to retrieve the state location.
>  at 
> org.apache.flink.queryablestate.client.proxy.KvStateClientProxyHandler.getKvStateLookupInfo(KvStateClientProxyHandler.java:228)
>  at 
> org.apache.flink.queryablestate.client.proxy.KvStateClientProxyHandler.getState(KvStateClientProxyHandler.java:162)
>  at 
> org.apache.flink.queryablestate.client.proxy.KvStateClientProxyHandler.executeActionAsync(KvStateClientProxyHandler.java:129)
>  at 
> 

[jira] [Commented] (FLINK-9356) Improve error message for when queryable state not ready / reachable

2018-05-22 Thread ASF GitHub Bot (JIRA)

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

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

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

https://github.com/apache/flink/pull/6028#discussion_r189815546
  
--- Diff: 
flink-queryable-state/flink-queryable-state-runtime/src/main/java/org/apache/flink/queryablestate/client/proxy/KvStateClientProxyHandler.java
 ---
@@ -225,7 +225,9 @@ private void executeActionAsync(
 
return location;
} else {
-   return FutureUtils.completedExceptionally(new 
UnknownLocationException("Could not contact the state location oracle to 
retrieve the state location."));
+   return FutureUtils.completedExceptionally(
+   new UnknownLocationException("Could not contact 
the state location oracle to retrieve the state location for state="
+   + queryableStateName + " of job=" + 
jobId + ", the caused reason maybe the state is not ready or there is no job 
exists."));
--- End diff --

I think this is a very good step in the right direction! What I've been 
wondering is 

a. Maybe we could look into whether or not we could distinguish the two 
cases and have separate error messages (this would require some more effort and 
I don't know if this is easily doable)

b. Do we need to expose the term "state location oracle" here? As an 
outstanding person I am not familiar with it and I think it might more more of 
a confusion than helpful to someone encountering that error message, seeing as 
this is not a really exceptional case but more of a setup / timing thing


> Improve error message for when queryable state not ready / reachable
> 
>
> Key: FLINK-9356
> URL: https://issues.apache.org/jira/browse/FLINK-9356
> Project: Flink
>  Issue Type: Improvement
>  Components: Queryable State
>Affects Versions: 1.5.0
>Reporter: Florian Schmidt
>Assignee: vinoyang
>Priority: Major
>
> When executing the queryable state client and either
> a. The queryable state is not ready
> b. There is no job with the specified job-id
>  
> one sees the following exception:
>  
> {code:java}
> Exception in thread "main" java.util.concurrent.ExecutionException: 
> java.lang.RuntimeException: Failed request 0.
>  Caused by: 
> org.apache.flink.queryablestate.exceptions.UnknownLocationException: Could 
> not contact the state location oracle to retrieve the state location.
>  at 
> org.apache.flink.queryablestate.client.proxy.KvStateClientProxyHandler.getKvStateLookupInfo(KvStateClientProxyHandler.java:228)
>  at 
> org.apache.flink.queryablestate.client.proxy.KvStateClientProxyHandler.getState(KvStateClientProxyHandler.java:162)
>  at 
> org.apache.flink.queryablestate.client.proxy.KvStateClientProxyHandler.executeActionAsync(KvStateClientProxyHandler.java:129)
>  at 
> org.apache.flink.queryablestate.client.proxy.KvStateClientProxyHandler.handleRequest(KvStateClientProxyHandler.java:119)
>  at 
> org.apache.flink.queryablestate.client.proxy.KvStateClientProxyHandler.handleRequest(KvStateClientProxyHandler.java:63)
>  at 
> org.apache.flink.queryablestate.network.AbstractServerHandler$AsyncRequestTask.run(AbstractServerHandler.java:236)
>  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
>  at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>  at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>  at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>  at java.lang.Thread.run(Thread.java:748)
> at 
> java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357)
>  at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1895)
>  at 
> org.apache.flink.streaming.tests.queryablestate.QsStateClient.getMapState(QsStateClient.java:122)
>  at 
> org.apache.flink.streaming.tests.queryablestate.QsStateClient.main(QsStateClient.java:75)
> Caused by: java.lang.RuntimeException: Failed request 0.
>  Caused by: 
> org.apache.flink.queryablestate.exceptions.UnknownLocationException: Could 
> not contact the state location oracle to retrieve the state location.
>  at 
> org.apache.flink.queryablestate.client.proxy.KvStateClientProxyHandler.getKvStateLookupInfo(KvStateClientProxyHandler.java:228)
>  at 
> org.apache.flink.queryablestate.client.proxy.KvStateClientProxyHandler.getState(KvStateClientProxyHandler.java:162)
>  at 
> org.apache.flink.queryablestate.client.proxy.KvStateClientProxyHandler.executeActionAsync(KvStateClientProxyHandler.java:129)
>  at 
> 

[jira] [Commented] (FLINK-9356) Improve error message for when queryable state not ready / reachable

2018-05-17 Thread ASF GitHub Bot (JIRA)

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

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

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

https://github.com/apache/flink/pull/6028#discussion_r189015635
  
--- Diff: 
flink-queryable-state/flink-queryable-state-runtime/src/main/java/org/apache/flink/queryablestate/client/proxy/KvStateClientProxyHandler.java
 ---
@@ -225,7 +225,9 @@ private void executeActionAsync(
 
return location;
} else {
-   return FutureUtils.completedExceptionally(new 
UnknownLocationException("Could not contact the state location oracle to 
retrieve the state location."));
+   return FutureUtils.completedExceptionally(
+   new UnknownLocationException("Could not contact 
the state location oracle to retrieve the state location for state="
+   + queryableStateName + " of job=" + 
jobId + ", the caused reason maybe the state is not ready or there is no job 
exists."));
--- End diff --

This message is pretty verbose and it contains grammatical errors. If it 
were to write this, it should be something like:

```
Could not contact the state location oracle to retrieve the location for 
state=QSName of job= JobID. The reason can be that the state is not ready or 
that that does not exist.
```

But before putting this in, it would be helpful if @florianschmidt1994 
commented on what he thinks, as he is the one that opened the issue.


> Improve error message for when queryable state not ready / reachable
> 
>
> Key: FLINK-9356
> URL: https://issues.apache.org/jira/browse/FLINK-9356
> Project: Flink
>  Issue Type: Improvement
>  Components: Queryable State
>Affects Versions: 1.5.0
>Reporter: Florian Schmidt
>Assignee: vinoyang
>Priority: Major
>
> When executing the queryable state client and either
> a. The queryable state is not ready
> b. There is no job with the specified job-id
>  
> one sees the following exception:
>  
> {code:java}
> Exception in thread "main" java.util.concurrent.ExecutionException: 
> java.lang.RuntimeException: Failed request 0.
>  Caused by: 
> org.apache.flink.queryablestate.exceptions.UnknownLocationException: Could 
> not contact the state location oracle to retrieve the state location.
>  at 
> org.apache.flink.queryablestate.client.proxy.KvStateClientProxyHandler.getKvStateLookupInfo(KvStateClientProxyHandler.java:228)
>  at 
> org.apache.flink.queryablestate.client.proxy.KvStateClientProxyHandler.getState(KvStateClientProxyHandler.java:162)
>  at 
> org.apache.flink.queryablestate.client.proxy.KvStateClientProxyHandler.executeActionAsync(KvStateClientProxyHandler.java:129)
>  at 
> org.apache.flink.queryablestate.client.proxy.KvStateClientProxyHandler.handleRequest(KvStateClientProxyHandler.java:119)
>  at 
> org.apache.flink.queryablestate.client.proxy.KvStateClientProxyHandler.handleRequest(KvStateClientProxyHandler.java:63)
>  at 
> org.apache.flink.queryablestate.network.AbstractServerHandler$AsyncRequestTask.run(AbstractServerHandler.java:236)
>  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
>  at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>  at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>  at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>  at java.lang.Thread.run(Thread.java:748)
> at 
> java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357)
>  at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1895)
>  at 
> org.apache.flink.streaming.tests.queryablestate.QsStateClient.getMapState(QsStateClient.java:122)
>  at 
> org.apache.flink.streaming.tests.queryablestate.QsStateClient.main(QsStateClient.java:75)
> Caused by: java.lang.RuntimeException: Failed request 0.
>  Caused by: 
> org.apache.flink.queryablestate.exceptions.UnknownLocationException: Could 
> not contact the state location oracle to retrieve the state location.
>  at 
> org.apache.flink.queryablestate.client.proxy.KvStateClientProxyHandler.getKvStateLookupInfo(KvStateClientProxyHandler.java:228)
>  at 
> org.apache.flink.queryablestate.client.proxy.KvStateClientProxyHandler.getState(KvStateClientProxyHandler.java:162)
>  at 
> org.apache.flink.queryablestate.client.proxy.KvStateClientProxyHandler.executeActionAsync(KvStateClientProxyHandler.java:129)
>  at 
> org.apache.flink.queryablestate.client.proxy.KvStateClientProxyHandler.handleRequest(KvStateClientProxyHandler.java:119)
>  at 
> 

[jira] [Commented] (FLINK-9356) Improve error message for when queryable state not ready / reachable

2018-05-17 Thread ASF GitHub Bot (JIRA)

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

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

Github user yanghua commented on the issue:

https://github.com/apache/flink/pull/6028
  
hi @kl0u , there is another PR about queryable state, would you like to 
have a look? thanks~


> Improve error message for when queryable state not ready / reachable
> 
>
> Key: FLINK-9356
> URL: https://issues.apache.org/jira/browse/FLINK-9356
> Project: Flink
>  Issue Type: Improvement
>  Components: Queryable State
>Affects Versions: 1.5.0
>Reporter: Florian Schmidt
>Assignee: vinoyang
>Priority: Major
>
> When executing the queryable state client and either
> a. The queryable state is not ready
> b. There is no job with the specified job-id
>  
> one sees the following exception:
>  
> {code:java}
> Exception in thread "main" java.util.concurrent.ExecutionException: 
> java.lang.RuntimeException: Failed request 0.
>  Caused by: 
> org.apache.flink.queryablestate.exceptions.UnknownLocationException: Could 
> not contact the state location oracle to retrieve the state location.
>  at 
> org.apache.flink.queryablestate.client.proxy.KvStateClientProxyHandler.getKvStateLookupInfo(KvStateClientProxyHandler.java:228)
>  at 
> org.apache.flink.queryablestate.client.proxy.KvStateClientProxyHandler.getState(KvStateClientProxyHandler.java:162)
>  at 
> org.apache.flink.queryablestate.client.proxy.KvStateClientProxyHandler.executeActionAsync(KvStateClientProxyHandler.java:129)
>  at 
> org.apache.flink.queryablestate.client.proxy.KvStateClientProxyHandler.handleRequest(KvStateClientProxyHandler.java:119)
>  at 
> org.apache.flink.queryablestate.client.proxy.KvStateClientProxyHandler.handleRequest(KvStateClientProxyHandler.java:63)
>  at 
> org.apache.flink.queryablestate.network.AbstractServerHandler$AsyncRequestTask.run(AbstractServerHandler.java:236)
>  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
>  at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>  at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>  at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>  at java.lang.Thread.run(Thread.java:748)
> at 
> java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357)
>  at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1895)
>  at 
> org.apache.flink.streaming.tests.queryablestate.QsStateClient.getMapState(QsStateClient.java:122)
>  at 
> org.apache.flink.streaming.tests.queryablestate.QsStateClient.main(QsStateClient.java:75)
> Caused by: java.lang.RuntimeException: Failed request 0.
>  Caused by: 
> org.apache.flink.queryablestate.exceptions.UnknownLocationException: Could 
> not contact the state location oracle to retrieve the state location.
>  at 
> org.apache.flink.queryablestate.client.proxy.KvStateClientProxyHandler.getKvStateLookupInfo(KvStateClientProxyHandler.java:228)
>  at 
> org.apache.flink.queryablestate.client.proxy.KvStateClientProxyHandler.getState(KvStateClientProxyHandler.java:162)
>  at 
> org.apache.flink.queryablestate.client.proxy.KvStateClientProxyHandler.executeActionAsync(KvStateClientProxyHandler.java:129)
>  at 
> org.apache.flink.queryablestate.client.proxy.KvStateClientProxyHandler.handleRequest(KvStateClientProxyHandler.java:119)
>  at 
> org.apache.flink.queryablestate.client.proxy.KvStateClientProxyHandler.handleRequest(KvStateClientProxyHandler.java:63)
>  at 
> org.apache.flink.queryablestate.network.AbstractServerHandler$AsyncRequestTask.run(AbstractServerHandler.java:236)
>  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
>  at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>  at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>  at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>  at java.lang.Thread.run(Thread.java:748)
> at 
> org.apache.flink.queryablestate.network.AbstractServerHandler$AsyncRequestTask.lambda$run$0(AbstractServerHandler.java:273)
>  at 
> java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:760)
>  at 
> java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(CompletableFuture.java:736)
>  at 
> java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:474)
>  at 
> java.util.concurrent.CompletableFuture.completeExceptionally(CompletableFuture.java:1977)
>  at 
> org.apache.flink.queryablestate.client.proxy.KvStateClientProxyHandler.lambda$executeActionAsync$0(KvStateClientProxyHandler.java:146)
>  at 
> 

[jira] [Commented] (FLINK-9356) Improve error message for when queryable state not ready / reachable

2018-05-17 Thread ASF GitHub Bot (JIRA)

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

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

Github user yanghua commented on the issue:

https://github.com/apache/flink/pull/6028
  
cc @tillrohrmann , 
[here](https://travis-ci.org/apache/flink/jobs/380067997) is a local recovery 
rocksdb full test error .


> Improve error message for when queryable state not ready / reachable
> 
>
> Key: FLINK-9356
> URL: https://issues.apache.org/jira/browse/FLINK-9356
> Project: Flink
>  Issue Type: Improvement
>  Components: Queryable State
>Affects Versions: 1.5.0
>Reporter: Florian Schmidt
>Assignee: vinoyang
>Priority: Major
>
> When executing the queryable state client and either
> a. The queryable state is not ready
> b. There is no job with the specified job-id
>  
> one sees the following exception:
>  
> {code:java}
> Exception in thread "main" java.util.concurrent.ExecutionException: 
> java.lang.RuntimeException: Failed request 0.
>  Caused by: 
> org.apache.flink.queryablestate.exceptions.UnknownLocationException: Could 
> not contact the state location oracle to retrieve the state location.
>  at 
> org.apache.flink.queryablestate.client.proxy.KvStateClientProxyHandler.getKvStateLookupInfo(KvStateClientProxyHandler.java:228)
>  at 
> org.apache.flink.queryablestate.client.proxy.KvStateClientProxyHandler.getState(KvStateClientProxyHandler.java:162)
>  at 
> org.apache.flink.queryablestate.client.proxy.KvStateClientProxyHandler.executeActionAsync(KvStateClientProxyHandler.java:129)
>  at 
> org.apache.flink.queryablestate.client.proxy.KvStateClientProxyHandler.handleRequest(KvStateClientProxyHandler.java:119)
>  at 
> org.apache.flink.queryablestate.client.proxy.KvStateClientProxyHandler.handleRequest(KvStateClientProxyHandler.java:63)
>  at 
> org.apache.flink.queryablestate.network.AbstractServerHandler$AsyncRequestTask.run(AbstractServerHandler.java:236)
>  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
>  at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>  at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>  at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>  at java.lang.Thread.run(Thread.java:748)
> at 
> java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357)
>  at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1895)
>  at 
> org.apache.flink.streaming.tests.queryablestate.QsStateClient.getMapState(QsStateClient.java:122)
>  at 
> org.apache.flink.streaming.tests.queryablestate.QsStateClient.main(QsStateClient.java:75)
> Caused by: java.lang.RuntimeException: Failed request 0.
>  Caused by: 
> org.apache.flink.queryablestate.exceptions.UnknownLocationException: Could 
> not contact the state location oracle to retrieve the state location.
>  at 
> org.apache.flink.queryablestate.client.proxy.KvStateClientProxyHandler.getKvStateLookupInfo(KvStateClientProxyHandler.java:228)
>  at 
> org.apache.flink.queryablestate.client.proxy.KvStateClientProxyHandler.getState(KvStateClientProxyHandler.java:162)
>  at 
> org.apache.flink.queryablestate.client.proxy.KvStateClientProxyHandler.executeActionAsync(KvStateClientProxyHandler.java:129)
>  at 
> org.apache.flink.queryablestate.client.proxy.KvStateClientProxyHandler.handleRequest(KvStateClientProxyHandler.java:119)
>  at 
> org.apache.flink.queryablestate.client.proxy.KvStateClientProxyHandler.handleRequest(KvStateClientProxyHandler.java:63)
>  at 
> org.apache.flink.queryablestate.network.AbstractServerHandler$AsyncRequestTask.run(AbstractServerHandler.java:236)
>  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
>  at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>  at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>  at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>  at java.lang.Thread.run(Thread.java:748)
> at 
> org.apache.flink.queryablestate.network.AbstractServerHandler$AsyncRequestTask.lambda$run$0(AbstractServerHandler.java:273)
>  at 
> java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:760)
>  at 
> java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(CompletableFuture.java:736)
>  at 
> java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:474)
>  at 
> java.util.concurrent.CompletableFuture.completeExceptionally(CompletableFuture.java:1977)
>  at 
> org.apache.flink.queryablestate.client.proxy.KvStateClientProxyHandler.lambda$executeActionAsync$0(KvStateClientProxyHandler.java:146)
>  at 
> 

[jira] [Commented] (FLINK-9356) Improve error message for when queryable state not ready / reachable

2018-05-17 Thread ASF GitHub Bot (JIRA)

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

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

GitHub user yanghua opened a pull request:

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

[FLINK-9356] Improve error message for when queryable state not ready / 
reachable

## What is the purpose of the change

*This pull request improve error message for when queryable state not ready 
/ reachable*


## Brief change log

  - *Improve error message for when queryable state not ready / reachable*

## Verifying this change

This change is a trivial rework / code cleanup without any test coverage.

## Does this pull request potentially affect one of the following parts:

  - Dependencies (does it add or upgrade a dependency): (yes / **no**)
  - The public API, i.e., is any changed class annotated with 
`@Public(Evolving)`: (yes / **no**)
  - The serializers: (yes / **no** / don't know)
  - The runtime per-record code paths (performance sensitive): (yes / 
**no** / don't know)
  - Anything that affects deployment or recovery: JobManager (and its 
components), Checkpointing, Yarn/Mesos, ZooKeeper: (yes / **no** / don't know)
  - The S3 file system connector: (yes / **no** / don't know)

## Documentation

  - Does this pull request introduce a new feature? (yes / **no**)
  - If yes, how is the feature documented? (not applicable / docs / 
JavaDocs / **not documented**)


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

$ git pull https://github.com/yanghua/flink FLINK-9356

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

https://github.com/apache/flink/pull/6028.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 #6028


commit 15ac42d7926be1ce0485b68f6bb23e4142fe7875
Author: yanghua 
Date:   2018-05-17T07:18:24Z

[FLINK-9356] Improve error message for when queryable state not ready / 
reachable




> Improve error message for when queryable state not ready / reachable
> 
>
> Key: FLINK-9356
> URL: https://issues.apache.org/jira/browse/FLINK-9356
> Project: Flink
>  Issue Type: Improvement
>  Components: Queryable State
>Affects Versions: 1.5.0
>Reporter: Florian Schmidt
>Assignee: vinoyang
>Priority: Major
>
> When executing the queryable state client and either
> a. The queryable state is not ready
> b. There is no job with the specified job-id
>  
> one sees the following exception:
>  
> {code:java}
> Exception in thread "main" java.util.concurrent.ExecutionException: 
> java.lang.RuntimeException: Failed request 0.
>  Caused by: 
> org.apache.flink.queryablestate.exceptions.UnknownLocationException: Could 
> not contact the state location oracle to retrieve the state location.
>  at 
> org.apache.flink.queryablestate.client.proxy.KvStateClientProxyHandler.getKvStateLookupInfo(KvStateClientProxyHandler.java:228)
>  at 
> org.apache.flink.queryablestate.client.proxy.KvStateClientProxyHandler.getState(KvStateClientProxyHandler.java:162)
>  at 
> org.apache.flink.queryablestate.client.proxy.KvStateClientProxyHandler.executeActionAsync(KvStateClientProxyHandler.java:129)
>  at 
> org.apache.flink.queryablestate.client.proxy.KvStateClientProxyHandler.handleRequest(KvStateClientProxyHandler.java:119)
>  at 
> org.apache.flink.queryablestate.client.proxy.KvStateClientProxyHandler.handleRequest(KvStateClientProxyHandler.java:63)
>  at 
> org.apache.flink.queryablestate.network.AbstractServerHandler$AsyncRequestTask.run(AbstractServerHandler.java:236)
>  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
>  at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>  at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>  at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>  at java.lang.Thread.run(Thread.java:748)
> at 
> java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357)
>  at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1895)
>  at 
> org.apache.flink.streaming.tests.queryablestate.QsStateClient.getMapState(QsStateClient.java:122)
>  at 
> org.apache.flink.streaming.tests.queryablestate.QsStateClient.main(QsStateClient.java:75)
> Caused by: java.lang.RuntimeException: Failed request 0.
>  Caused by: 
> org.apache.flink.queryablestate.exceptions.UnknownLocationException: Could 
> not contact the state location oracle to retrieve the state location.
>  at 
>