-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[controller] Add instance stoppable check based on CV states
- Loading branch information
Sourav Maji
committed
Sep 25, 2024
1 parent
328d72a
commit fde0153
Showing
13 changed files
with
258 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
...e-common/src/main/java/com/linkedin/venice/controllerapi/StoppableNodeStatusResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package com.linkedin.venice.controllerapi; | ||
|
||
import java.util.List; | ||
import java.util.Map; | ||
|
||
|
||
public class StoppableNodeStatusResponse extends ControllerResponse { | ||
private List<String> stoppableInstances; | ||
private Map<String, String> nonStoppableInstancesStatusMap; | ||
|
||
public Map<String, String> getNonStoppableInstancesStatusMap() { | ||
return nonStoppableInstancesStatusMap; | ||
} | ||
|
||
public void setNonStoppableInstancesStatusMap(Map<String, String> nonStoppableInstancesStatusMap) { | ||
this.nonStoppableInstancesStatusMap = nonStoppableInstancesStatusMap; | ||
} | ||
|
||
public List<String> getStoppableInstances() { | ||
return stoppableInstances; | ||
} | ||
|
||
public void setStoppableInstances(List<String> remoableInstances) { | ||
this.stoppableInstances = remoableInstances; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
...ce-controller/src/main/java/com/linkedin/venice/controller/InstanceRemovableStatuses.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package com.linkedin.venice.controller; | ||
|
||
import java.util.List; | ||
import java.util.Map; | ||
|
||
|
||
public class InstanceRemovableStatuses { | ||
private List<String> stoppableInstances; | ||
private Map<String, String> nonStoppableInstancesStatusMap; | ||
|
||
private String redirectUrl; | ||
|
||
public void setRedirectUrl(String redirectUrl) { | ||
this.redirectUrl = redirectUrl; | ||
} | ||
|
||
public String getRedirectUrl() { | ||
return redirectUrl; | ||
} | ||
|
||
public Map<String, String> getNonStoppableInstancesStatusMap() { | ||
return nonStoppableInstancesStatusMap; | ||
} | ||
|
||
public void setNonStoppableInstancesStatusMap(Map<String, String> nonStoppableInstancesStatusMap) { | ||
this.nonStoppableInstancesStatusMap = nonStoppableInstancesStatusMap; | ||
} | ||
|
||
public List<String> getStoppableInstances() { | ||
return stoppableInstances; | ||
} | ||
|
||
public void setStoppableInstances(List<String> remoableInstances) { | ||
this.stoppableInstances = remoableInstances; | ||
} | ||
|
||
public enum NonStoppableReason { | ||
WILL_LOSE_DATA, MIN_ACTIVE_REPLICA_VIOLATION, ONGOING_MAINTENANCE, UNKNOWN_INSTANCE; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.