Alexey Serbin has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/12619 )

Change subject: [master] cache locations assigned to clients
......................................................................


Patch Set 1:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/12619/1/src/kudu/master/master_service.cc
File src/kudu/master/master_service.cc:

http://gerrit.cloudera.org:8080/#/c/12619/1/src/kudu/master/master_service.cc@571
PS1, Line 571:   // Assign a location to the client if needed.
             :   if (!FLAGS_location_mapping_cmd.empty() &&
             :       
PREDICT_TRUE(FLAGS_master_client_location_assignment_enabled)) {
             :     const auto& location_key = rpc->remote_address().host();
             :     auto* location_cache = server_->location_cache();
             :     string location;
             :     if (location_cache->Get(location_key, &location)) {
             :       resp->set_client_location(location);
             :     } else {
             :       Status s = 
GetLocationFromLocationMappingCmd(FLAGS_location_mapping_cmd,
             :                                                    
rpc->remote_address().host(),
             :                                                    &location);
             :       if (s.ok()) {
             :         location_cache->PutIfNotPresent(location_key, location);
             :         resp->set_client_location(location);
             :       } else {
             :         LOG(WARNING) << Substitute("unable to assign location to 
client $0@$1: $2",
             :                                    rpc->remote_user().ToString(),
             :                                    
rpc->remote_address().ToString(),
             :                                    s.ToString());
             :       }
             :     }
             :   }
> Consider moving part (or all) of this into the LocationCache, if only for b
Yep, that's the target and pretty invasive approach.  I just hoped to get away 
with a fix here.



--
To view, visit http://gerrit.cloudera.org:8080/12619
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I12c8952c43a8ad352acd46c8006824b2ad9d1204
Gerrit-Change-Number: 12619
Gerrit-PatchSet: 1
Gerrit-Owner: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Adar Dembo <[email protected]>
Gerrit-Reviewer: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Andrew Wong <[email protected]>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Will Berkeley <[email protected]>
Gerrit-Comment-Date: Wed, 27 Feb 2019 05:52:54 +0000
Gerrit-HasComments: Yes

Reply via email to