Package org.apache.hadoop.ipc
Class Server.Call
java.lang.Object
org.apache.hadoop.ipc.Server.Call
- All Implemented Interfaces:
PrivilegedExceptionAction<Void>,Schedulable
- Direct Known Subclasses:
ExternalCall
- Enclosing class:
- Server
public static class Server.Call
extends Object
implements Schedulable, PrivilegedExceptionAction<Void>
A generic call queued for handling.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCall(int id, int retryCount, Void ignore1, Void ignore2, RPC.RpcKind kind, byte[] clientId) -
Method Summary
Modifier and TypeMethodDescriptionfinal voidvoidThis is overridden only inServer.Call.longorg.apache.hadoop.thirdparty.protobuf.ByteStringintintlonglongbooleanbooleanvoidmarkCallCoordinated(boolean flag) final voidAllow a IPC response to be postponed instead of sent immediately after the handler returns from the proxy method.run()final voidvoidsetClientStateId(long stateId) voidvoidsetDeferredResponse(Writable response) voidsetFederatedNamespaceState(org.apache.hadoop.thirdparty.protobuf.ByteString federatedNamespaceState) voidsetPriorityLevel(int priorityLevel) voidsetStartHandleTimestampNanos(long startHandleTimestampNanos) toString()
-
Field Details
-
startHandleTimestampNanos
protected long startHandleTimestampNanos
-
-
Constructor Details
-
Call
@VisibleForTesting public Call(int id, int retryCount, Void ignore1, Void ignore2, RPC.RpcKind kind, byte[] clientId)
-
-
Method Details
-
getProcessingDetails
-
setFederatedNamespaceState
public void setFederatedNamespaceState(org.apache.hadoop.thirdparty.protobuf.ByteString federatedNamespaceState) -
getFederatedNamespaceState
public org.apache.hadoop.thirdparty.protobuf.ByteString getFederatedNamespaceState() -
toString
-
run
- Specified by:
runin interfacePrivilegedExceptionAction<Void>- Throws:
Exception
-
getRemoteUser
-
getHostInetAddress
-
getRemotePort
public int getRemotePort() -
getHostAddress
-
getProtocol
-
postponeResponse
@Unstable @LimitedPrivate("HDFS") public final void postponeResponse()Allow a IPC response to be postponed instead of sent immediately after the handler returns from the proxy method. The intended use case is freeing up the handler thread when the response is known, but an expensive pre-condition must be satisfied before it's sent to the client. -
sendResponse
- Throws:
IOException
-
abortResponse
- Throws:
IOException
-
getUserGroupInformation
- Specified by:
getUserGroupInformationin interfaceSchedulable
-
getCallerContext
Description copied from interface:SchedulableThis is overridden only inServer.Call. The CallerContext field will be used to carry information about the user in cases where UGI proves insufficient. Any other classes that might try to use this method, will get an UnsupportedOperationException.- Specified by:
getCallerContextin interfaceSchedulable- Returns:
- an instance of CallerContext if method is overridden else get an UnsupportedOperationException
-
getPriorityLevel
public int getPriorityLevel()- Specified by:
getPriorityLevelin interfaceSchedulable
-
setPriorityLevel
public void setPriorityLevel(int priorityLevel) -
getClientStateId
public long getClientStateId() -
setClientStateId
public void setClientStateId(long stateId) -
markCallCoordinated
public void markCallCoordinated(boolean flag) -
isCallCoordinated
public boolean isCallCoordinated() -
deferResponse
@Unstable public void deferResponse() -
isResponseDeferred
@Unstable public boolean isResponseDeferred() -
setDeferredResponse
-
setDeferredError
-
getTimestampNanos
public long getTimestampNanos() -
getStartHandleTimestampNanos
public long getStartHandleTimestampNanos() -
setStartHandleTimestampNanos
public void setStartHandleTimestampNanos(long startHandleTimestampNanos)
-