Alexey Serbin has submitted this change and it was merged. ( 
http://gerrit.cloudera.org:8080/11207 )

Change subject: [location_awareness] replica selection honors placement policy
......................................................................

[location_awareness] replica selection honors placement policy

This patch introduces placement policy into the catalog manager's
replica selection process. The replica selection logic is factored out
into the new PlacementPolicy class.

In essence (for details see [1]), the placement policy is about:
  * in case of N locations, N > 2, not placing the majority of replicas
    in one location
  * spreading replicas evenly among available locations
  * within a location, spreading replicas evenly among tablet servers

This patch also adds a few test scenarios for the new functionality.

[1] https://s.apache.org/location-awareness-design

Change-Id: I4169098abf17d5591d4c1675561afc15b5477fcd
Reviewed-on: http://gerrit.cloudera.org:8080/11207
Reviewed-by: Adar Dembo <[email protected]>
Reviewed-by: Will Berkeley <[email protected]>
Tested-by: Kudu Jenkins
---
M src/kudu/gutil/map-util.h
M src/kudu/master/CMakeLists.txt
M src/kudu/master/catalog_manager.cc
M src/kudu/master/catalog_manager.h
A src/kudu/master/placement_policy-test.cc
A src/kudu/master/placement_policy.cc
A src/kudu/master/placement_policy.h
M src/kudu/master/ts_descriptor.cc
M src/kudu/master/ts_descriptor.h
M src/kudu/master/ts_manager.cc
M src/kudu/master/ts_manager.h
11 files changed, 1,228 insertions(+), 224 deletions(-)

Approvals:
  Adar Dembo: Looks good to me, but someone else must approve
  Will Berkeley: Looks good to me, approved
  Kudu Jenkins: Verified

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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I4169098abf17d5591d4c1675561afc15b5477fcd
Gerrit-Change-Number: 11207
Gerrit-PatchSet: 13
Gerrit-Owner: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Adar Dembo <[email protected]>
Gerrit-Reviewer: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Will Berkeley <[email protected]>

Reply via email to