-
Notifications
You must be signed in to change notification settings - Fork 204
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
Emit failover events into the job autoscaler events to allow autoscaling decisions #676
Conversation
Uploaded ArtifactsTo use these artifacts in your Gradle project, paste the following lines in your build.gradle.
|
@@ -341,7 +341,12 @@ public int getDesiredWorkersForScaleUp(final int increment, final int numCurrent | |||
return numCurrentWorkers; | |||
} else { | |||
final int maxWorkersForStage = stageSchedulingInfo.getScalingPolicy().getMax(); | |||
desiredWorkers = Math.min(numCurrentWorkers + increment, maxWorkersForStage); | |||
if (reason == ScalingReason.AutoscalerManager) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
todo: this condition is no longer correct.
@@ -86,7 +86,7 @@ public enum ScalingReason { | |||
RPS, | |||
JVMMemory, | |||
SourceJobDrop, | |||
FailoverAware | |||
AutoscalerManager |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AutoscalerManager vs RPS/JVMMemory seems a bit strange?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe "AutoscalerManagerEvent"
@@ -39,6 +39,10 @@ default boolean isScaleDownEnabled() { | |||
return true; | |||
} | |||
|
|||
default double getCurrentValue() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you add a document here about why it's -1?
@@ -416,6 +417,19 @@ public void onNext(MetricData metricData) { | |||
}; | |||
} | |||
|
|||
private void maybeEmitAutoscalerManagerEvent(int numWorkers) { | |||
final double currentValue = jobAutoscalerManager.getCurrentValue(); | |||
if (currentValue >= 0.0 && currentValue <= 100.0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you add a inline doc about this logic? why it's 0 to 100?
Context
Explain context and other details for this pull request.
Checklist
./gradlew build
compiles code correctly./gradlew test
passes all tests