org.apache.flink.runtime.rest.messages.job.metrics.JobMetricsHeaders Java Examples
The following examples show how to use
org.apache.flink.runtime.rest.messages.job.metrics.JobMetricsHeaders.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: YARNHighAvailabilityITCase.java From Flink-CEPplus with Apache License 2.0 | 6 votes |
private static Optional<Metric> getJobMetric( final RestClusterClient<ApplicationId> restClusterClient, final JobID jobId, final String metricName) throws Exception { final JobMetricsMessageParameters messageParameters = new JobMetricsMessageParameters(); messageParameters.jobPathParameter.resolve(jobId); messageParameters.metricsFilterParameter.resolveFromString(metricName); final Collection<Metric> metrics = restClusterClient.sendRequest( JobMetricsHeaders.getInstance(), messageParameters, EmptyRequestBody.getInstance()).get().getMetrics(); final Metric metric = Iterables.getOnlyElement(metrics, null); checkState(metric == null || metric.getId().equals(metricName)); return Optional.ofNullable(metric); }
Example #2
Source File: YARNHighAvailabilityITCase.java From flink with Apache License 2.0 | 6 votes |
private static Optional<Metric> getJobMetric( final RestClusterClient<ApplicationId> restClusterClient, final JobID jobId, final String metricName) throws Exception { final JobMetricsMessageParameters messageParameters = new JobMetricsMessageParameters(); messageParameters.jobPathParameter.resolve(jobId); messageParameters.metricsFilterParameter.resolveFromString(metricName); final Collection<Metric> metrics = restClusterClient.sendRequest( JobMetricsHeaders.getInstance(), messageParameters, EmptyRequestBody.getInstance()).get().getMetrics(); final Metric metric = Iterables.getOnlyElement(metrics, null); checkState(metric == null || metric.getId().equals(metricName)); return Optional.ofNullable(metric); }
Example #3
Source File: YARNHighAvailabilityITCase.java From flink with Apache License 2.0 | 6 votes |
private static Optional<Metric> getJobMetric( final RestClusterClient<ApplicationId> restClusterClient, final JobID jobId, final String metricName) throws Exception { final JobMetricsMessageParameters messageParameters = new JobMetricsMessageParameters(); messageParameters.jobPathParameter.resolve(jobId); messageParameters.metricsFilterParameter.resolveFromString(metricName); final Collection<Metric> metrics = restClusterClient.sendRequest( JobMetricsHeaders.getInstance(), messageParameters, EmptyRequestBody.getInstance()).get().getMetrics(); final Metric metric = Iterables.getOnlyElement(metrics, null); checkState(metric == null || metric.getId().equals(metricName)); return Optional.ofNullable(metric); }
Example #4
Source File: JobMetricsHandler.java From Flink-CEPplus with Apache License 2.0 | 5 votes |
public JobMetricsHandler( final GatewayRetriever<? extends RestfulGateway> leaderRetriever, final Time timeout, final Map<String, String> headers, final MetricFetcher metricFetcher) { super(leaderRetriever, timeout, headers, JobMetricsHeaders.getInstance(), metricFetcher); }
Example #5
Source File: JobMetricsHandler.java From flink with Apache License 2.0 | 5 votes |
public JobMetricsHandler( final GatewayRetriever<? extends RestfulGateway> leaderRetriever, final Time timeout, final Map<String, String> headers, final MetricFetcher metricFetcher) { super(leaderRetriever, timeout, headers, JobMetricsHeaders.getInstance(), metricFetcher); }
Example #6
Source File: JobMetricsHandler.java From flink with Apache License 2.0 | 5 votes |
public JobMetricsHandler( final GatewayRetriever<? extends RestfulGateway> leaderRetriever, final Time timeout, final Map<String, String> headers, final MetricFetcher metricFetcher) { super(leaderRetriever, timeout, headers, JobMetricsHeaders.getInstance(), metricFetcher); }