dlmarion commented on code in PR #2620:
URL: https://github.com/apache/accumulo/pull/2620#discussion_r849441380
##########
core/src/main/java/org/apache/accumulo/core/rpc/ThriftUtil.java:
##########
@@ -93,8 +98,19 @@ public static TTransportFactory transportFactory() {
*/
public static <T extends TServiceClient> T
createClient(TServiceClientFactory<T> factory,
TTransport transport) {
- return factory.getClient(protocolFactory.getProtocol(transport),
- protocolFactory.getProtocol(transport));
+
+ TProtocol protocol = protocolFactory.getProtocol(transport);
+ if (factory instanceof ClientService.Client.Factory) {
+ protocol = new TMultiplexedProtocol(protocol, "ClientService");
+ } else if (factory instanceof TabletClientService.Client.Factory) {
+ protocol = new TMultiplexedProtocol(protocol, "TabletClientService");
+ } else if (factory instanceof FateService.Client.Factory) {
+ protocol = new TMultiplexedProtocol(protocol, "FateService");
+ } else if (factory instanceof ManagerClientService.Client.Factory) {
+ protocol = new TMultiplexedProtocol(protocol, "ManagerClientService");
+ }
Review Comment:
Addressed in e243d49 by consolidating Thrift client creation logic in the
new class `ThriftClientTypes` and consolidating Thrift server-side TProcessor
creation in the new class `ThriftServerTypes`. Fixing the code to use these new
types removed code that was creating multiple Thrift client factory objects.
##########
test/src/main/java/org/apache/accumulo/test/performance/NullTserver.java:
##########
@@ -92,14 +91,11 @@
*/
public class NullTserver {
- public static class ThriftClientHandler extends ClientServiceHandler
- implements TabletClientService.Iface {
+ public static class ThriftClientHandler implements TabletClientService.Iface
{
private long updateSession = 1;
- public ThriftClientHandler(ServerContext context, TransactionWatcher
watcher) {
- super(context, watcher);
- }
+ public ThriftClientHandler(ServerContext context, TransactionWatcher
watcher) {}
Review Comment:
Addressed in e243d49, constructor removed
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]