Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Makes allocator decision classes top-level classes #21662

Merged

Conversation

abeyad
Copy link

@abeyad abeyad commented Nov 18, 2016

This commit moves several allocation decider related inner classes
into their own top-level class, in order to use more easily in
the allocation explain API. This commit also renames some of those
decision related classes to more suitable names.

This is simply a cosmetic change - no functionality changes with this
commit whatsoever.

To summarize the changes:

  1. ShardAllocationDecision renamed to AllocateUnassignedDecision
  2. RelocationDecision moved to a top-level class
  3. MoveDecision moved to a top-level class
  4. RebalanceDecision moved to a top-level class
  5. ShardAllocationDecisionTests renamed to AllocateUnassignedDecisionTests
  6. NodeRebalanceResult moved to a top-level class
  7. ShardAllocationDecision#WeightedDecision moved to a top-level class and renamed to NodeAllocationResult.

into their own top-level class, in order to use more easily in
the allocation explain API.  This commit also renames some of those
decision related classes to more suitable names.

This is simply a cosmetic change - no functionality changes with this
commit whatsoever.
@abeyad abeyad changed the title Makes allocator decision classes to top-level classes Makes allocator decision classes top-level classes Nov 18, 2016
Copy link
Contributor

@ywelsch ywelsch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@abeyad
Copy link
Author

abeyad commented Nov 18, 2016

thanks @ywelsch

@abeyad abeyad merged commit 1d2a154 into elastic:master Nov 18, 2016
@abeyad abeyad deleted the explain_api_refactor_move_inner_classes branch November 18, 2016 15:19
abeyad pushed a commit that referenced this pull request Nov 18, 2016
This commit moves several allocation decider related inner classes
into their own top-level class, in order to use more easily in
the allocation explain API. This commit also renames some of those
decision related classes to more suitable names.

This is simply a cosmetic change - no functionality changes with this
commit whatsoever.

To summarize the changes:
 1. ShardAllocationDecision renamed to AllocateUnassignedDecision
 2. RelocationDecision moved to a top-level class
 3. MoveDecision moved to a top-level class
 4. RebalanceDecision moved to a top-level class
 5. ShardAllocationDecisionTests renamed to AllocateUnassignedDecisionTests
 6. NodeRebalanceResult moved to a top-level class
 7. ShardAllocationDecision#WeightedDecision moved to a top-level class and renamed to NodeAllocationResult.
@abeyad
Copy link
Author

abeyad commented Nov 18, 2016

5.x commit: e086ca1

abeyad pushed a commit to abeyad/elasticsearch that referenced this pull request Dec 3, 2016
them to be used directly by the cluster allocation explain API.  In
particular, this commit does the following:

 1. Adds serialization and toXContent methods to the response objects,
    which will form the explain API responses.
 2. Moves the calculation of the final explanation to the response
    object itself, removing it from the responsibility of the
    allocators.
 3. Adds shard store information to the NodeAllocationResult, so that
    store information is available for each node, when explaining a
    shard allocation by the PrimaryShardAllocator or the
    ReplicaShardAllocator.
 4. Moves NodeRebalanceResult to its own top-level class, as that
    was forgotten to be done in elastic#21662.
 5. Adds delta information to the NodeRebalanceResult.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants