Package org.apache.flink.autoscaler
Class RestApiMetricsCollector<KEY,Context extends JobAutoScalerContext<KEY>>
- java.lang.Object
-
- org.apache.flink.autoscaler.ScalingMetricCollector<KEY,Context>
-
- org.apache.flink.autoscaler.RestApiMetricsCollector<KEY,Context>
-
public class RestApiMetricsCollector<KEY,Context extends JobAutoScalerContext<KEY>> extends ScalingMetricCollector<KEY,Context>
Metric collector using flink rest api.
-
-
Field Summary
-
Fields inherited from class org.apache.flink.autoscaler.ScalingMetricCollector
jobsWithGcMetrics
-
-
Constructor Summary
Constructors Constructor Description RestApiMetricsCollector()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.util.Map<FlinkMetric,org.apache.flink.runtime.rest.messages.job.metrics.AggregatedMetric>
queryAggregatedTmMetrics(org.apache.flink.client.program.rest.RestClusterClient<?> restClient, java.util.Map<java.lang.String,FlinkMetric> metrics)
protected java.util.Map<FlinkMetric,org.apache.flink.runtime.rest.messages.job.metrics.AggregatedMetric>
queryAggregatedVertexMetrics(Context ctx, org.apache.flink.runtime.jobgraph.JobVertexID jobVertexID, java.util.Map<java.lang.String,FlinkMetric> metrics)
protected java.util.Map<org.apache.flink.runtime.jobgraph.JobVertexID,java.util.Map<FlinkMetric,org.apache.flink.runtime.rest.messages.job.metrics.AggregatedMetric>>
queryAllAggregatedMetrics(Context ctx, java.util.Map<org.apache.flink.runtime.jobgraph.JobVertexID,java.util.Map<java.lang.String,FlinkMetric>> filteredVertexMetricNames)
protected java.util.Map<FlinkMetric,org.apache.flink.runtime.rest.messages.job.metrics.Metric>
queryJmMetrics(Context ctx)
protected java.util.Map<FlinkMetric,org.apache.flink.runtime.rest.messages.job.metrics.Metric>
queryJmMetrics(org.apache.flink.client.program.rest.RestClusterClient<?> restClient, java.util.Map<java.lang.String,FlinkMetric> metrics)
protected java.util.Map<FlinkMetric,org.apache.flink.runtime.rest.messages.job.metrics.AggregatedMetric>
queryTmMetrics(Context ctx)
-
Methods inherited from class org.apache.flink.autoscaler.ScalingMetricCollector
cleanup, getAvailableVertexMetricNames, getHistories, getJobDetailsInfo, getJobRunningTs, getJobTopology, getJobTopology, getMetricWindowSize, queryAggregatedMetricNames, queryFilteredMetricNames, setClock, updateMetrics
-
-
-
-
Method Detail
-
queryAllAggregatedMetrics
protected java.util.Map<org.apache.flink.runtime.jobgraph.JobVertexID,java.util.Map<FlinkMetric,org.apache.flink.runtime.rest.messages.job.metrics.AggregatedMetric>> queryAllAggregatedMetrics(Context ctx, java.util.Map<org.apache.flink.runtime.jobgraph.JobVertexID,java.util.Map<java.lang.String,FlinkMetric>> filteredVertexMetricNames)
- Specified by:
queryAllAggregatedMetrics
in classScalingMetricCollector<KEY,Context extends JobAutoScalerContext<KEY>>
-
queryAggregatedVertexMetrics
protected java.util.Map<FlinkMetric,org.apache.flink.runtime.rest.messages.job.metrics.AggregatedMetric> queryAggregatedVertexMetrics(Context ctx, org.apache.flink.runtime.jobgraph.JobVertexID jobVertexID, java.util.Map<java.lang.String,FlinkMetric> metrics)
-
queryJmMetrics
protected java.util.Map<FlinkMetric,org.apache.flink.runtime.rest.messages.job.metrics.Metric> queryJmMetrics(Context ctx)
- Specified by:
queryJmMetrics
in classScalingMetricCollector<KEY,Context extends JobAutoScalerContext<KEY>>
-
queryJmMetrics
protected java.util.Map<FlinkMetric,org.apache.flink.runtime.rest.messages.job.metrics.Metric> queryJmMetrics(org.apache.flink.client.program.rest.RestClusterClient<?> restClient, java.util.Map<java.lang.String,FlinkMetric> metrics)
-
queryTmMetrics
protected java.util.Map<FlinkMetric,org.apache.flink.runtime.rest.messages.job.metrics.AggregatedMetric> queryTmMetrics(Context ctx) throws java.lang.Exception
- Specified by:
queryTmMetrics
in classScalingMetricCollector<KEY,Context extends JobAutoScalerContext<KEY>>
- Throws:
java.lang.Exception
-
queryAggregatedTmMetrics
protected java.util.Map<FlinkMetric,org.apache.flink.runtime.rest.messages.job.metrics.AggregatedMetric> queryAggregatedTmMetrics(org.apache.flink.client.program.rest.RestClusterClient<?> restClient, java.util.Map<java.lang.String,FlinkMetric> metrics)
-
-