Alexey Serbin has submitted this change and it was merged. ( 
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.  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.  Of course, this is done under assumption
that the name of a node isn't changing under a running Kudu server.

This patch also contains a few test scenarios to cover the new
functionality.  Existing {TabletServerTest,MasterTest}.ServerAttributes
test scenarios have been updated accordingly.

Change-Id: I1c13e0b4c4320b5b3eeaaf8e63df8b0d56f0ee6a
Reviewed-on: http://gerrit.cloudera.org:8080/20609
Tested-by: Kudu Jenkins
Reviewed-by: Abhishek Chennaka <[email protected]>
---
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/rpc-test-base.h
M src/kudu/server/server_base.cc
M src/kudu/tserver/tablet_server-test.cc
7 files changed, 66 insertions(+), 17 deletions(-)

Approvals:
  Kudu Jenkins: Verified
  Abhishek Chennaka: Looks good to me, approved

--
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: merged
Gerrit-Change-Id: I1c13e0b4c4320b5b3eeaaf8e63df8b0d56f0ee6a
Gerrit-Change-Number: 20609
Gerrit-PatchSet: 5
Gerrit-Owner: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Abhishek Chennaka <[email protected]>
Gerrit-Reviewer: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Yingchun Lai <[email protected]>

Reply via email to