Alexey Serbin has uploaded this change for review. ( 
http://gerrit.cloudera.org:8080/20609


Change subject: [rpc] add hostname in Messenger to use it in ServerNegotiation
......................................................................

[rpc] add hostname in Messenger to use it in ServerNegotiation

This patch introduces a new 'hostname' property for the Messenger class
to use it in ServerNegotiation.  By doing so, a call to GetFQDN() is
avoided during RPC connection negotiation at the server side.  A call
to GetFQDN() might be quite expensive since sometimes it turns into
a remote call, and if DNS resolver is slow or misconfigured, the
round-trip might take several seconds as seen in a some real world
Kudu clusters.  By avoiding calls to GetFQDN() as part of
ServerNegotiation::InitSaslServer(), the server-side negotiation is now
more robust at least when using Kerberos credentials for RPC
authentication.

The hostname (usually FQDN) is retrieved as a part of KuduServer::Init()
and stored in the messenger.  It's used later on to set the 'hostname'
attribute for the server metrics and also when running server-side
RPC connection negotiation.

I also updated the related code in KuduClient to populate the 'hostname'
property of the messenger and added new test scenarios to cover the
newly introduced functionality.

Change-Id: I1c13e0b4c4320b5b3eeaaf8e63df8b0d56f0ee6a
---
M src/kudu/client/client-test.cc
M src/kudu/client/client.cc
M src/kudu/client/client.h
M src/kudu/master/master-test.cc
M src/kudu/rpc/messenger.cc
M src/kudu/rpc/messenger.h
M src/kudu/rpc/negotiation.cc
M src/kudu/rpc/server_negotiation.h
M src/kudu/server/server_base.cc
M src/kudu/server/server_base.h
M src/kudu/tserver/tablet_server-test.cc
11 files changed, 88 insertions(+), 24 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/09/20609/1
--
To view, visit http://gerrit.cloudera.org:8080/20609
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I1c13e0b4c4320b5b3eeaaf8e63df8b0d56f0ee6a
Gerrit-Change-Number: 20609
Gerrit-PatchSet: 1
Gerrit-Owner: Alexey Serbin <[email protected]>

Reply via email to