org.apache.accumulo.server.util
public class CustomNonBlockingServer extends org.apache.thrift.server.THsHaServer
THsHaServer features, and overriding the underlying
TNonblockingServer methods, especially TNonblockingServer.SelectAcceptThread, in order to override the
AbstractNonblockingServer.FrameBuffer and AbstractNonblockingServer.AsyncFrameBuffer with
one that reveals the client address from its transport.
The justification for this is explained in https://issues.apache.org/jira/browse/ACCUMULO-1691, and is needed due to the repeated regressions:
This class contains a copy of TNonblockingServer.SelectAcceptThread from Thrift 0.9.1, with the slight modification of
instantiating a custom FrameBuffer, rather than the AbstractNonblockingServer.FrameBuffer and
AbstractNonblockingServer.AsyncFrameBuffer. Because of this, any change in the implementation upstream will require a review
of this implementation here, to ensure any new bugfixes/features in the upstream Thrift class are also applied here, at least until
https://issues.apache.org/jira/browse/THRIFT-2173 is implemented. In the meantime, the maven-enforcer-plugin ensures that Thrift remains at version 0.9.1,
which has been reviewed and tested.
org.apache.thrift.server.THsHaServer.Argsorg.apache.thrift.server.AbstractNonblockingServer.AbstractNonblockingServerArgs<T extends org.apache.thrift.server.AbstractNonblockingServer.AbstractNonblockingServerArgs<T>>, org.apache.thrift.server.AbstractNonblockingServer.AbstractSelectThread, org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer, org.apache.thrift.server.AbstractNonblockingServer.FrameBuffer| Constructor and Description |
|---|
CustomNonBlockingServer(org.apache.thrift.server.THsHaServer.Args args) |
| Modifier and Type | Method and Description |
|---|---|
protected Runnable |
getRunnable(org.apache.thrift.server.AbstractNonblockingServer.FrameBuffer frameBuffer) |
boolean |
isStopped() |
protected void |
joinSelector() |
protected boolean |
startThreads() |
void |
stop() |
createInvokerPool, gracefullyShutdownInvokerPool, requestInvoke, waitForShutdownserve, startListening, stopListeningpublic CustomNonBlockingServer(org.apache.thrift.server.THsHaServer.Args args)
protected Runnable getRunnable(org.apache.thrift.server.AbstractNonblockingServer.FrameBuffer frameBuffer)
getRunnable in class org.apache.thrift.server.THsHaServerprotected boolean startThreads()
startThreads in class org.apache.thrift.server.TNonblockingServerpublic void stop()
stop in class org.apache.thrift.server.TNonblockingServerpublic boolean isStopped()
isStopped in class org.apache.thrift.server.TNonblockingServerprotected void joinSelector()
joinSelector in class org.apache.thrift.server.TNonblockingServerCopyright © 2011–2016 The Apache Software Foundation. All rights reserved.