Github user sudheeshkatkam commented on a diff in the pull request:
https://github.com/apache/drill/pull/460#discussion_r58613516
--- Diff:
exec/java-exec/src/main/java/org/apache/drill/exec/rpc/user/QueryResultHandler.java
---
@@ -278,49 +297,31 @@ public void queryIdArrived(QueryId queryId) {
private class SubmissionListener extends BaseRpcOutcomeListener<QueryId>
{
private final UserResultsListener resultsListener;
- private final RemoteConnection connection;
- private final ChannelFuture closeFuture;
- private final ChannelClosedListener closeListener;
private final AtomicBoolean isTerminal = new AtomicBoolean(false);
- public SubmissionListener(RemoteConnection connection,
UserResultsListener resultsListener) {
- super();
+ public SubmissionListener(UserResultsListener resultsListener) {
this.resultsListener = resultsListener;
- this.connection = connection;
- this.closeFuture = connection.getChannel().closeFuture();
- this.closeListener = new ChannelClosedListener();
- closeFuture.addListener(closeListener);
- }
-
- private class ChannelClosedListener implements
GenericFutureListener<Future<Void>> {
-
- @Override
- public void operationComplete(Future<Void> future) throws Exception {
- resultsListener.submissionFailed(UserException.connectionError()
- .message("Connection %s closed unexpectedly.",
connection.getName())
- .build(logger));
- }
-
}
@Override
public void failed(RpcException ex) {
if (!isTerminal.compareAndSet(false, true)) {
+ logger.warn("Received multiple outcomes (success/failure) while
submitting query.");
return;
}
- closeFuture.removeListener(closeListener);
-
resultsListener.submissionFailed(UserException.systemError(ex).build(logger));
-
+ resultsListener.submissionFailed(UserException.systemError(ex)
+ .message("Unexpected failure while submitting query to a
Drillbit.")
--- End diff --
Looks like system errors preserve the original message. So this message was
being ignored. I'll add the message to context.
---
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 [email protected] or file a JIRA ticket
with INFRA.
---