keith-turner commented on PR #2620: URL: https://github.com/apache/accumulo/pull/2620#issuecomment-1102799804
>>> Do you think I should benchmark it? >>> >> If you want to. A map lookup seems really trivial compared to the overhead of the IO >> >That's what I'm thinking. I'm thinking the overhead is negligible. The map is created when the TProcessor is set up and is static. The Thrift server thread comes into the process method and decodes the message to know which TProcessor implementation to send it to. Looking at it does seem like it should be extremely fast and that benchmarking should not be needed. The map is a hashmap and the key is string which has good hashcode and equals functions. Since we have a small static set of service names in a small hashmap, our worst case for performance would be if a lot of the service names happened to hash to the same bucket in the hashmap resulting in linear searches within the map. It does add a small amount of data to each RPC request, looking at the javadoc for `TMultiplexedProcessor` it seems the servicename from the thrift IDL is added to each RPC request. So scan RPCs may now have the extra data `TabletClientService` from the service name defined in the idl. Not sure if this will matter or if it would be worthwhile to have a shorter service name. -- 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]
