Search in sources :

Example 1 with SamzaAppMasterMetrics

use of org.apache.samza.job.yarn.SamzaAppMasterMetrics in project samza by apache.

the class TestApplicationMasterRestClient method assignMetricValues.

private void assignMetricValues(SamzaApplicationState samzaAppState, MetricsRegistryMap registry) {
    SamzaAppMasterMetrics metrics = new SamzaAppMasterMetrics(new MapConfig(), samzaAppState, registry);
    metrics.start();
    samzaAppState.runningProcessors.put("dummyContainer", // 1 container
    new SamzaResource(1, 2, AM_HOST_NAME, "dummyResourceId"));
    samzaAppState.neededProcessors.set(2);
    samzaAppState.completedProcessors.set(3);
    samzaAppState.failedContainers.set(4);
    samzaAppState.releasedContainers.set(5);
    samzaAppState.processorCount.set(6);
    samzaAppState.jobHealthy.set(true);
}
Also used : MapConfig(org.apache.samza.config.MapConfig) SamzaResource(org.apache.samza.clustermanager.SamzaResource) SamzaAppMasterMetrics(org.apache.samza.job.yarn.SamzaAppMasterMetrics)

Aggregations

SamzaResource (org.apache.samza.clustermanager.SamzaResource)1 MapConfig (org.apache.samza.config.MapConfig)1 SamzaAppMasterMetrics (org.apache.samza.job.yarn.SamzaAppMasterMetrics)1