Search in sources :

Example 1 with DummyCharacterFilter

use of org.apache.flink.runtime.metrics.util.DummyCharacterFilter in project flink by apache.

the class JobManagerGroupTest method testCreateQueryServiceMetricInfo.

@Test
public void testCreateQueryServiceMetricInfo() {
    MetricRegistry registry = new MetricRegistry(MetricRegistryConfiguration.defaultMetricRegistryConfiguration());
    JobManagerMetricGroup jm = new JobManagerMetricGroup(registry, "host");
    QueryScopeInfo.JobManagerQueryScopeInfo info = jm.createQueryServiceMetricInfo(new DummyCharacterFilter());
    assertEquals("", info.scope);
}
Also used : QueryScopeInfo(org.apache.flink.runtime.metrics.dump.QueryScopeInfo) MetricRegistry(org.apache.flink.runtime.metrics.MetricRegistry) DummyCharacterFilter(org.apache.flink.runtime.metrics.util.DummyCharacterFilter) Test(org.junit.Test)

Example 2 with DummyCharacterFilter

use of org.apache.flink.runtime.metrics.util.DummyCharacterFilter in project flink by apache.

the class JobManagerJobGroupTest method testCreateQueryServiceMetricInfo.

@Test
public void testCreateQueryServiceMetricInfo() {
    JobID jid = new JobID();
    MetricRegistry registry = new MetricRegistry(MetricRegistryConfiguration.defaultMetricRegistryConfiguration());
    JobManagerMetricGroup jm = new JobManagerMetricGroup(registry, "host");
    JobManagerJobMetricGroup jmj = new JobManagerJobMetricGroup(registry, jm, jid, "jobname");
    QueryScopeInfo.JobQueryScopeInfo info = jmj.createQueryServiceMetricInfo(new DummyCharacterFilter());
    assertEquals("", info.scope);
    assertEquals(jid.toString(), info.jobID);
}
Also used : QueryScopeInfo(org.apache.flink.runtime.metrics.dump.QueryScopeInfo) MetricRegistry(org.apache.flink.runtime.metrics.MetricRegistry) DummyCharacterFilter(org.apache.flink.runtime.metrics.util.DummyCharacterFilter) JobID(org.apache.flink.api.common.JobID) Test(org.junit.Test)

Example 3 with DummyCharacterFilter

use of org.apache.flink.runtime.metrics.util.DummyCharacterFilter in project flink by apache.

the class TaskManagerJobGroupTest method testCreateQueryServiceMetricInfo.

@Test
public void testCreateQueryServiceMetricInfo() {
    JobID jid = new JobID();
    MetricRegistry registry = new MetricRegistry(MetricRegistryConfiguration.defaultMetricRegistryConfiguration());
    TaskManagerMetricGroup tm = new TaskManagerMetricGroup(registry, "host", "id");
    TaskManagerJobMetricGroup job = new TaskManagerJobMetricGroup(registry, tm, jid, "jobname");
    QueryScopeInfo.JobQueryScopeInfo info = job.createQueryServiceMetricInfo(new DummyCharacterFilter());
    assertEquals("", info.scope);
    assertEquals(jid.toString(), info.jobID);
}
Also used : QueryScopeInfo(org.apache.flink.runtime.metrics.dump.QueryScopeInfo) MetricRegistry(org.apache.flink.runtime.metrics.MetricRegistry) DummyCharacterFilter(org.apache.flink.runtime.metrics.util.DummyCharacterFilter) JobID(org.apache.flink.api.common.JobID) Test(org.junit.Test)

Example 4 with DummyCharacterFilter

use of org.apache.flink.runtime.metrics.util.DummyCharacterFilter in project flink by apache.

the class TaskManagerGroupTest method testCreateQueryServiceMetricInfo.

@Test
public void testCreateQueryServiceMetricInfo() {
    MetricRegistry registry = new MetricRegistry(MetricRegistryConfiguration.defaultMetricRegistryConfiguration());
    TaskManagerMetricGroup tm = new TaskManagerMetricGroup(registry, "host", "id");
    QueryScopeInfo.TaskManagerQueryScopeInfo info = tm.createQueryServiceMetricInfo(new DummyCharacterFilter());
    assertEquals("", info.scope);
    assertEquals("id", info.taskManagerID);
}
Also used : QueryScopeInfo(org.apache.flink.runtime.metrics.dump.QueryScopeInfo) MetricRegistry(org.apache.flink.runtime.metrics.MetricRegistry) DummyCharacterFilter(org.apache.flink.runtime.metrics.util.DummyCharacterFilter) Test(org.junit.Test)

Example 5 with DummyCharacterFilter

use of org.apache.flink.runtime.metrics.util.DummyCharacterFilter in project flink by apache.

the class TaskMetricGroupTest method testCreateQueryServiceMetricInfo.

@Test
public void testCreateQueryServiceMetricInfo() {
    JobID jid = new JobID();
    AbstractID vid = new AbstractID();
    AbstractID eid = new AbstractID();
    MetricRegistry registry = new MetricRegistry(MetricRegistryConfiguration.defaultMetricRegistryConfiguration());
    TaskManagerMetricGroup tm = new TaskManagerMetricGroup(registry, "host", "id");
    TaskManagerJobMetricGroup job = new TaskManagerJobMetricGroup(registry, tm, jid, "jobname");
    TaskMetricGroup task = new TaskMetricGroup(registry, job, vid, eid, "taskName", 4, 5);
    QueryScopeInfo.TaskQueryScopeInfo info = task.createQueryServiceMetricInfo(new DummyCharacterFilter());
    assertEquals("", info.scope);
    assertEquals(jid.toString(), info.jobID);
    assertEquals(vid.toString(), info.vertexID);
    assertEquals(4, info.subtaskIndex);
}
Also used : QueryScopeInfo(org.apache.flink.runtime.metrics.dump.QueryScopeInfo) MetricRegistry(org.apache.flink.runtime.metrics.MetricRegistry) DummyCharacterFilter(org.apache.flink.runtime.metrics.util.DummyCharacterFilter) AbstractID(org.apache.flink.util.AbstractID) JobID(org.apache.flink.api.common.JobID) Test(org.junit.Test)

Aggregations

MetricRegistry (org.apache.flink.runtime.metrics.MetricRegistry)7 QueryScopeInfo (org.apache.flink.runtime.metrics.dump.QueryScopeInfo)7 DummyCharacterFilter (org.apache.flink.runtime.metrics.util.DummyCharacterFilter)7 Test (org.junit.Test)7 JobID (org.apache.flink.api.common.JobID)5 AbstractID (org.apache.flink.util.AbstractID)3