Package org.apache.drill.exec.rpc
Class AbstractDisposableUserClientConnection
java.lang.Object
org.apache.drill.exec.rpc.AbstractDisposableUserClientConnection
- All Implemented Interfaces:
UserClientConnection
- Direct Known Subclasses:
BaseWebUserConnection
public abstract class AbstractDisposableUserClientConnection
extends Object
implements UserClientConnection
Helps to run a query and await on the results. All the inheriting sub-class
manages the session/connection state and submits query with respect to that
state. The subclass instance lifetime is per query lifetime and is not
re-used.
-
Field Summary
Modifier and TypeFieldDescriptionprotected UserBitShared.DrillPBError
protected final CountDownLatch
protected String
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
await()
Wait indefinitely until the query is completed.boolean
await
(long timeoutMillis) Wait until the query has completed or timeout is passed.getError()
void
sendResult
(RpcOutcomeListener<GeneralRPCProtos.Ack> listener, UserBitShared.QueryResult result) Send query result outcome to client.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.drill.exec.rpc.UserClientConnection
getClosureFuture, getRemoteAddress, getSession, sendData
-
Field Details
-
latch
-
error
-
queryState
-
-
Constructor Details
-
AbstractDisposableUserClientConnection
public AbstractDisposableUserClientConnection()
-
-
Method Details
-
await
Wait until the query has completed or timeout is passed.- Throws:
InterruptedException
-
await
Wait indefinitely until the query is completed. Used only in case of WebUser- Throws:
Exception
-
getError
- Returns:
- Any error returned in query execution.
-
getQueryState
-