org.apache.flink.runtime.metrics.dump.QueryScopeInfo Java Examples

The following examples show how to use org.apache.flink.runtime.metrics.dump.QueryScopeInfo. 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: AggregatingJobsMetricsHandlerTest.java    From flink with Apache License 2.0 6 votes vote down vote up
@Override
protected Collection<MetricDump> getMetricDumps() {
	Collection<MetricDump> dumps = new ArrayList<>(3);
	QueryScopeInfo.JobQueryScopeInfo job = new QueryScopeInfo.JobQueryScopeInfo(JOB_ID_1.toString(), "abc");
	MetricDump.CounterDump cd1 = new MetricDump.CounterDump(job, "metric1", 1);
	dumps.add(cd1);

	QueryScopeInfo.JobQueryScopeInfo job2 = new QueryScopeInfo.JobQueryScopeInfo(JOB_ID_2.toString(), "abc");
	MetricDump.CounterDump cd2 = new MetricDump.CounterDump(job2, "metric1", 3);
	dumps.add(cd2);

	QueryScopeInfo.JobQueryScopeInfo job3 = new QueryScopeInfo.JobQueryScopeInfo(JOB_ID_3.toString(), "abc");
	MetricDump.CounterDump cd3 = new MetricDump.CounterDump(job3, "metric2", 5);
	dumps.add(cd3);
	return dumps;
}
 
Example #2
Source File: OperatorGroupTest.java    From flink with Apache License 2.0 6 votes vote down vote up
@Test
public void testCreateQueryServiceMetricInfo() {
	JobID jid = new JobID();
	JobVertexID vid = new JobVertexID();
	AbstractID eid = new AbstractID();
	OperatorID oid = new OperatorID();
	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);
	OperatorMetricGroup operator = new OperatorMetricGroup(registry, task, oid, "operator");

	QueryScopeInfo.OperatorQueryScopeInfo info = operator.createQueryServiceMetricInfo(new DummyCharacterFilter());
	assertEquals("", info.scope);
	assertEquals(jid.toString(), info.jobID);
	assertEquals(vid.toString(), info.vertexID);
	assertEquals(4, info.subtaskIndex);
	assertEquals("operator", info.operatorName);
}
 
Example #3
Source File: MetricStoreTest.java    From flink with Apache License 2.0 6 votes vote down vote up
@Test
public void testMalformedNameHandling() {
	MetricStore store = new MetricStore();
	//-----verify that no exceptions are thrown

	// null
	store.add(null);
	// empty name
	QueryScopeInfo.JobManagerQueryScopeInfo info = new QueryScopeInfo.JobManagerQueryScopeInfo("");
	MetricDump.CounterDump cd = new MetricDump.CounterDump(info, "", 0);
	store.add(cd);

	//-----verify that no side effects occur
	assertEquals(0, store.getJobManager().metrics.size());
	assertEquals(0, store.getTaskManagers().size());
	assertEquals(0, store.getJobs().size());
}
 
Example #4
Source File: MetricStoreTest.java    From flink with Apache License 2.0 6 votes vote down vote up
@Test
public void testMalformedNameHandling() {
	MetricStore store = new MetricStore();
	//-----verify that no exceptions are thrown

	// null
	store.add(null);
	// empty name
	QueryScopeInfo.JobManagerQueryScopeInfo info = new QueryScopeInfo.JobManagerQueryScopeInfo("");
	MetricDump.CounterDump cd = new MetricDump.CounterDump(info, "", 0);
	store.add(cd);

	//-----verify that no side effects occur
	assertEquals(0, store.getJobManager().metrics.size());
	assertEquals(0, store.getTaskManagers().size());
	assertEquals(0, store.getJobs().size());
}
 
Example #5
Source File: AggregatingTaskManagersMetricsHandlerTest.java    From flink with Apache License 2.0 6 votes vote down vote up
@Override
protected Collection<MetricDump> getMetricDumps() {
	Collection<MetricDump> dumps = new ArrayList<>(3);
	QueryScopeInfo.TaskManagerQueryScopeInfo tm1 = new QueryScopeInfo.TaskManagerQueryScopeInfo(TM_ID_1.toString(), "abc");
	MetricDump.CounterDump cd1 = new MetricDump.CounterDump(tm1, "metric1", 1);
	dumps.add(cd1);

	QueryScopeInfo.TaskManagerQueryScopeInfo tm2 = new QueryScopeInfo.TaskManagerQueryScopeInfo(TM_ID_2.toString(), "abc");
	MetricDump.CounterDump cd2 = new MetricDump.CounterDump(tm2, "metric1", 3);
	dumps.add(cd2);

	QueryScopeInfo.TaskManagerQueryScopeInfo tm3 = new QueryScopeInfo.TaskManagerQueryScopeInfo(TM_ID_3.toString(), "abc");
	MetricDump.CounterDump cd3 = new MetricDump.CounterDump(tm3, "metric2", 5);
	dumps.add(cd3);

	return dumps;
}
 
Example #6
Source File: MetricGroupTest.java    From flink with Apache License 2.0 6 votes vote down vote up
@Test
public void testCreateQueryServiceMetricInfo() {
	JobID jid = new JobID();
	JobVertexID vid = new JobVertexID();
	AbstractID eid = new AbstractID();
	MetricRegistryImpl registry = new MetricRegistryImpl(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);
	GenericMetricGroup userGroup1 = new GenericMetricGroup(registry, task, "hello");
	GenericMetricGroup userGroup2 = new GenericMetricGroup(registry, userGroup1, "world");

	QueryScopeInfo.TaskQueryScopeInfo info1 = (QueryScopeInfo.TaskQueryScopeInfo) userGroup1.createQueryServiceMetricInfo(new DummyCharacterFilter());
	assertEquals("hello", info1.scope);
	assertEquals(jid.toString(), info1.jobID);
	assertEquals(vid.toString(), info1.vertexID);
	assertEquals(4, info1.subtaskIndex);

	QueryScopeInfo.TaskQueryScopeInfo info2 = (QueryScopeInfo.TaskQueryScopeInfo) userGroup2.createQueryServiceMetricInfo(new DummyCharacterFilter());
	assertEquals("hello.world", info2.scope);
	assertEquals(jid.toString(), info2.jobID);
	assertEquals(vid.toString(), info2.vertexID);
	assertEquals(4, info2.subtaskIndex);
}
 
Example #7
Source File: MetricGroupTest.java    From Flink-CEPplus with Apache License 2.0 6 votes vote down vote up
@Test
public void testCreateQueryServiceMetricInfo() {
	JobID jid = new JobID();
	JobVertexID vid = new JobVertexID();
	AbstractID eid = new AbstractID();
	MetricRegistryImpl registry = new MetricRegistryImpl(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);
	GenericMetricGroup userGroup1 = new GenericMetricGroup(registry, task, "hello");
	GenericMetricGroup userGroup2 = new GenericMetricGroup(registry, userGroup1, "world");

	QueryScopeInfo.TaskQueryScopeInfo info1 = (QueryScopeInfo.TaskQueryScopeInfo) userGroup1.createQueryServiceMetricInfo(new DummyCharacterFilter());
	assertEquals("hello", info1.scope);
	assertEquals(jid.toString(), info1.jobID);
	assertEquals(vid.toString(), info1.vertexID);
	assertEquals(4, info1.subtaskIndex);

	QueryScopeInfo.TaskQueryScopeInfo info2 = (QueryScopeInfo.TaskQueryScopeInfo) userGroup2.createQueryServiceMetricInfo(new DummyCharacterFilter());
	assertEquals("hello.world", info2.scope);
	assertEquals(jid.toString(), info2.jobID);
	assertEquals(vid.toString(), info2.vertexID);
	assertEquals(4, info2.subtaskIndex);
}
 
Example #8
Source File: AggregatingSubtasksMetricsHandlerTest.java    From flink with Apache License 2.0 6 votes vote down vote up
@Override
protected Collection<MetricDump> getMetricDumps() {
	Collection<MetricDump> dumps = new ArrayList<>(3);
	QueryScopeInfo.TaskQueryScopeInfo task1 = new QueryScopeInfo.TaskQueryScopeInfo(JOB_ID.toString(), TASK_ID.toString(), 1, "abc");
	MetricDump.CounterDump cd1 = new MetricDump.CounterDump(task1, "metric1", 1);
	dumps.add(cd1);

	QueryScopeInfo.TaskQueryScopeInfo task2 = new QueryScopeInfo.TaskQueryScopeInfo(JOB_ID.toString(), TASK_ID.toString(), 2, "abc");
	MetricDump.CounterDump cd2 = new MetricDump.CounterDump(task2, "metric1", 3);
	dumps.add(cd2);

	QueryScopeInfo.TaskQueryScopeInfo task3 = new QueryScopeInfo.TaskQueryScopeInfo(JOB_ID.toString(), TASK_ID.toString(), 3, "abc");
	MetricDump.CounterDump cd3 = new MetricDump.CounterDump(task3, "metric2", 5);
	dumps.add(cd3);

	return dumps;
}
 
Example #9
Source File: AbstractMetricsHandlerTest.java    From flink with Apache License 2.0 6 votes vote down vote up
@Before
public void setUp() {
	MockitoAnnotations.initMocks(this);

	final MetricStore metricStore = new MetricStore();
	metricStore.add(new MetricDump.CounterDump(
		new QueryScopeInfo.JobManagerQueryScopeInfo(),
		TEST_METRIC_NAME,
		TEST_METRIC_VALUE));

	when(mockMetricFetcher.getMetricStore()).thenReturn(metricStore);

	testMetricsHandler = new TestMetricsHandler(
		new GatewayRetriever<DispatcherGateway>() {
			@Override
			public CompletableFuture<DispatcherGateway> getFuture() {
				return CompletableFuture.completedFuture(mockDispatcherGateway);
			}
		},
		Time.milliseconds(50),
		Collections.emptyMap(),
		new TestMetricsHeaders(),
		mockMetricFetcher);
}
 
Example #10
Source File: AbstractMetricsHandlerTest.java    From flink with Apache License 2.0 6 votes vote down vote up
@Before
public void setUp() {
	MockitoAnnotations.initMocks(this);

	final MetricStore metricStore = new MetricStore();
	metricStore.add(new MetricDump.CounterDump(
		new QueryScopeInfo.JobManagerQueryScopeInfo(),
		TEST_METRIC_NAME,
		TEST_METRIC_VALUE));

	when(mockMetricFetcher.getMetricStore()).thenReturn(metricStore);

	testMetricsHandler = new TestMetricsHandler(
		new GatewayRetriever<DispatcherGateway>() {
			@Override
			public CompletableFuture<DispatcherGateway> getFuture() {
				return CompletableFuture.completedFuture(mockDispatcherGateway);
			}
		},
		Time.milliseconds(50),
		Collections.emptyMap(),
		new TestMetricsHeaders(),
		mockMetricFetcher);
}
 
Example #11
Source File: AggregatingTaskManagersMetricsHandlerTest.java    From Flink-CEPplus with Apache License 2.0 6 votes vote down vote up
@Override
protected Collection<MetricDump> getMetricDumps() {
	Collection<MetricDump> dumps = new ArrayList<>(3);
	QueryScopeInfo.TaskManagerQueryScopeInfo tm1 = new QueryScopeInfo.TaskManagerQueryScopeInfo(TM_ID_1.toString(), "abc");
	MetricDump.CounterDump cd1 = new MetricDump.CounterDump(tm1, "metric1", 1);
	dumps.add(cd1);

	QueryScopeInfo.TaskManagerQueryScopeInfo tm2 = new QueryScopeInfo.TaskManagerQueryScopeInfo(TM_ID_2.toString(), "abc");
	MetricDump.CounterDump cd2 = new MetricDump.CounterDump(tm2, "metric1", 3);
	dumps.add(cd2);

	QueryScopeInfo.TaskManagerQueryScopeInfo tm3 = new QueryScopeInfo.TaskManagerQueryScopeInfo(TM_ID_3.toString(), "abc");
	MetricDump.CounterDump cd3 = new MetricDump.CounterDump(tm3, "metric2", 5);
	dumps.add(cd3);

	return dumps;
}
 
Example #12
Source File: AggregatingSubtasksMetricsHandlerTest.java    From Flink-CEPplus with Apache License 2.0 6 votes vote down vote up
@Override
protected Collection<MetricDump> getMetricDumps() {
	Collection<MetricDump> dumps = new ArrayList<>(3);
	QueryScopeInfo.TaskQueryScopeInfo task1 = new QueryScopeInfo.TaskQueryScopeInfo(JOB_ID.toString(), TASK_ID.toString(), 1, "abc");
	MetricDump.CounterDump cd1 = new MetricDump.CounterDump(task1, "metric1", 1);
	dumps.add(cd1);

	QueryScopeInfo.TaskQueryScopeInfo task2 = new QueryScopeInfo.TaskQueryScopeInfo(JOB_ID.toString(), TASK_ID.toString(), 2, "abc");
	MetricDump.CounterDump cd2 = new MetricDump.CounterDump(task2, "metric1", 3);
	dumps.add(cd2);

	QueryScopeInfo.TaskQueryScopeInfo task3 = new QueryScopeInfo.TaskQueryScopeInfo(JOB_ID.toString(), TASK_ID.toString(), 3, "abc");
	MetricDump.CounterDump cd3 = new MetricDump.CounterDump(task3, "metric2", 5);
	dumps.add(cd3);

	return dumps;
}
 
Example #13
Source File: AggregatingJobsMetricsHandlerTest.java    From flink with Apache License 2.0 6 votes vote down vote up
@Override
protected Collection<MetricDump> getMetricDumps() {
	Collection<MetricDump> dumps = new ArrayList<>(3);
	QueryScopeInfo.JobQueryScopeInfo job = new QueryScopeInfo.JobQueryScopeInfo(JOB_ID_1.toString(), "abc");
	MetricDump.CounterDump cd1 = new MetricDump.CounterDump(job, "metric1", 1);
	dumps.add(cd1);

	QueryScopeInfo.JobQueryScopeInfo job2 = new QueryScopeInfo.JobQueryScopeInfo(JOB_ID_2.toString(), "abc");
	MetricDump.CounterDump cd2 = new MetricDump.CounterDump(job2, "metric1", 3);
	dumps.add(cd2);

	QueryScopeInfo.JobQueryScopeInfo job3 = new QueryScopeInfo.JobQueryScopeInfo(JOB_ID_3.toString(), "abc");
	MetricDump.CounterDump cd3 = new MetricDump.CounterDump(job3, "metric2", 5);
	dumps.add(cd3);
	return dumps;
}
 
Example #14
Source File: AggregatingSubtasksMetricsHandlerTest.java    From flink with Apache License 2.0 6 votes vote down vote up
@Override
protected Collection<MetricDump> getMetricDumps() {
	Collection<MetricDump> dumps = new ArrayList<>(3);
	QueryScopeInfo.TaskQueryScopeInfo task1 = new QueryScopeInfo.TaskQueryScopeInfo(JOB_ID.toString(), TASK_ID.toString(), 1, "abc");
	MetricDump.CounterDump cd1 = new MetricDump.CounterDump(task1, "metric1", 1);
	dumps.add(cd1);

	QueryScopeInfo.TaskQueryScopeInfo task2 = new QueryScopeInfo.TaskQueryScopeInfo(JOB_ID.toString(), TASK_ID.toString(), 2, "abc");
	MetricDump.CounterDump cd2 = new MetricDump.CounterDump(task2, "metric1", 3);
	dumps.add(cd2);

	QueryScopeInfo.TaskQueryScopeInfo task3 = new QueryScopeInfo.TaskQueryScopeInfo(JOB_ID.toString(), TASK_ID.toString(), 3, "abc");
	MetricDump.CounterDump cd3 = new MetricDump.CounterDump(task3, "metric2", 5);
	dumps.add(cd3);

	return dumps;
}
 
Example #15
Source File: AggregatingJobsMetricsHandlerTest.java    From Flink-CEPplus with Apache License 2.0 6 votes vote down vote up
@Override
protected Collection<MetricDump> getMetricDumps() {
	Collection<MetricDump> dumps = new ArrayList<>(3);
	QueryScopeInfo.JobQueryScopeInfo job = new QueryScopeInfo.JobQueryScopeInfo(JOB_ID_1.toString(), "abc");
	MetricDump.CounterDump cd1 = new MetricDump.CounterDump(job, "metric1", 1);
	dumps.add(cd1);

	QueryScopeInfo.JobQueryScopeInfo job2 = new QueryScopeInfo.JobQueryScopeInfo(JOB_ID_2.toString(), "abc");
	MetricDump.CounterDump cd2 = new MetricDump.CounterDump(job2, "metric1", 3);
	dumps.add(cd2);

	QueryScopeInfo.JobQueryScopeInfo job3 = new QueryScopeInfo.JobQueryScopeInfo(JOB_ID_3.toString(), "abc");
	MetricDump.CounterDump cd3 = new MetricDump.CounterDump(job3, "metric2", 5);
	dumps.add(cd3);
	return dumps;
}
 
Example #16
Source File: AbstractMetricsHandlerTest.java    From Flink-CEPplus with Apache License 2.0 6 votes vote down vote up
@Before
public void setUp() {
	MockitoAnnotations.initMocks(this);

	final MetricStore metricStore = new MetricStore();
	metricStore.add(new MetricDump.CounterDump(
		new QueryScopeInfo.JobManagerQueryScopeInfo(),
		TEST_METRIC_NAME,
		TEST_METRIC_VALUE));

	when(mockMetricFetcher.getMetricStore()).thenReturn(metricStore);

	testMetricsHandler = new TestMetricsHandler(
		new GatewayRetriever<DispatcherGateway>() {
			@Override
			public CompletableFuture<DispatcherGateway> getFuture() {
				return CompletableFuture.completedFuture(mockDispatcherGateway);
			}
		},
		Time.milliseconds(50),
		Collections.emptyMap(),
		new TestMetricsHeaders(),
		mockMetricFetcher);
}
 
Example #17
Source File: AggregatingTaskManagersMetricsHandlerTest.java    From flink with Apache License 2.0 6 votes vote down vote up
@Override
protected Collection<MetricDump> getMetricDumps() {
	Collection<MetricDump> dumps = new ArrayList<>(3);
	QueryScopeInfo.TaskManagerQueryScopeInfo tm1 = new QueryScopeInfo.TaskManagerQueryScopeInfo(TM_ID_1.toString(), "abc");
	MetricDump.CounterDump cd1 = new MetricDump.CounterDump(tm1, "metric1", 1);
	dumps.add(cd1);

	QueryScopeInfo.TaskManagerQueryScopeInfo tm2 = new QueryScopeInfo.TaskManagerQueryScopeInfo(TM_ID_2.toString(), "abc");
	MetricDump.CounterDump cd2 = new MetricDump.CounterDump(tm2, "metric1", 3);
	dumps.add(cd2);

	QueryScopeInfo.TaskManagerQueryScopeInfo tm3 = new QueryScopeInfo.TaskManagerQueryScopeInfo(TM_ID_3.toString(), "abc");
	MetricDump.CounterDump cd3 = new MetricDump.CounterDump(tm3, "metric2", 5);
	dumps.add(cd3);

	return dumps;
}
 
Example #18
Source File: OperatorGroupTest.java    From flink with Apache License 2.0 6 votes vote down vote up
@Test
public void testCreateQueryServiceMetricInfo() {
	JobID jid = new JobID();
	JobVertexID vid = new JobVertexID();
	AbstractID eid = new AbstractID();
	OperatorID oid = new OperatorID();
	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);
	OperatorMetricGroup operator = new OperatorMetricGroup(registry, task, oid, "operator");

	QueryScopeInfo.OperatorQueryScopeInfo info = operator.createQueryServiceMetricInfo(new DummyCharacterFilter());
	assertEquals("", info.scope);
	assertEquals(jid.toString(), info.jobID);
	assertEquals(vid.toString(), info.vertexID);
	assertEquals(4, info.subtaskIndex);
	assertEquals("operator", info.operatorName);
}
 
Example #19
Source File: MetricStoreTest.java    From Flink-CEPplus with Apache License 2.0 6 votes vote down vote up
@Test
public void testMalformedNameHandling() {
	MetricStore store = new MetricStore();
	//-----verify that no exceptions are thrown

	// null
	store.add(null);
	// empty name
	QueryScopeInfo.JobManagerQueryScopeInfo info = new QueryScopeInfo.JobManagerQueryScopeInfo("");
	MetricDump.CounterDump cd = new MetricDump.CounterDump(info, "", 0);
	store.add(cd);

	//-----verify that no side effects occur
	assertEquals(0, store.getJobManager().metrics.size());
	assertEquals(0, store.getTaskManagers().size());
	assertEquals(0, store.getJobs().size());
}
 
Example #20
Source File: MetricGroupTest.java    From flink with Apache License 2.0 6 votes vote down vote up
@Test
public void testCreateQueryServiceMetricInfo() {
	JobID jid = new JobID();
	JobVertexID vid = new JobVertexID();
	AbstractID eid = new AbstractID();
	MetricRegistryImpl registry = new MetricRegistryImpl(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);
	GenericMetricGroup userGroup1 = new GenericMetricGroup(registry, task, "hello");
	GenericMetricGroup userGroup2 = new GenericMetricGroup(registry, userGroup1, "world");

	QueryScopeInfo.TaskQueryScopeInfo info1 = (QueryScopeInfo.TaskQueryScopeInfo) userGroup1.createQueryServiceMetricInfo(new DummyCharacterFilter());
	assertEquals("hello", info1.scope);
	assertEquals(jid.toString(), info1.jobID);
	assertEquals(vid.toString(), info1.vertexID);
	assertEquals(4, info1.subtaskIndex);

	QueryScopeInfo.TaskQueryScopeInfo info2 = (QueryScopeInfo.TaskQueryScopeInfo) userGroup2.createQueryServiceMetricInfo(new DummyCharacterFilter());
	assertEquals("hello.world", info2.scope);
	assertEquals(jid.toString(), info2.jobID);
	assertEquals(vid.toString(), info2.vertexID);
	assertEquals(4, info2.subtaskIndex);
}
 
Example #21
Source File: JobManagerJobGroupTest.java    From flink with Apache License 2.0 5 votes vote down vote up
@Test
public void testCreateQueryServiceMetricInfo() {
	JobID jid = new JobID();
	MetricRegistryImpl registry = new MetricRegistryImpl(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);
}
 
Example #22
Source File: TaskMetricGroup.java    From flink with Apache License 2.0 5 votes vote down vote up
@Override
protected QueryScopeInfo.TaskQueryScopeInfo createQueryServiceMetricInfo(CharacterFilter filter) {
	return new QueryScopeInfo.TaskQueryScopeInfo(
		this.parent.jobId.toString(),
		String.valueOf(this.vertexId),
		this.subtaskIndex);
}
 
Example #23
Source File: OperatorMetricGroup.java    From flink with Apache License 2.0 5 votes vote down vote up
@Override
protected QueryScopeInfo.OperatorQueryScopeInfo createQueryServiceMetricInfo(CharacterFilter filter) {
	return new QueryScopeInfo.OperatorQueryScopeInfo(
		this.parent.parent.jobId.toString(),
		this.parent.vertexId.toString(),
		this.parent.subtaskIndex,
		filter.filterCharacters(this.operatorName));
}
 
Example #24
Source File: JobManagerGroupTest.java    From flink with Apache License 2.0 5 votes vote down vote up
@Test
public void testCreateQueryServiceMetricInfo() {
	MetricRegistryImpl registry = new MetricRegistryImpl(MetricRegistryConfiguration.defaultMetricRegistryConfiguration());
	JobManagerMetricGroup jm = new JobManagerMetricGroup(registry, "host");

	QueryScopeInfo.JobManagerQueryScopeInfo info = jm.createQueryServiceMetricInfo(new DummyCharacterFilter());
	assertEquals("", info.scope);
}
 
Example #25
Source File: TaskManagerJobGroupTest.java    From flink with Apache License 2.0 5 votes vote down vote up
@Test
public void testCreateQueryServiceMetricInfo() {
	JobID jid = new JobID();
	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);
}
 
Example #26
Source File: TaskMetricGroupTest.java    From flink with Apache License 2.0 5 votes vote down vote up
@Test
public void testCreateQueryServiceMetricInfo() {
	JobID jid = new JobID();
	JobVertexID vid = new JobVertexID();
	AbstractID eid = new AbstractID();
	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);
}
 
Example #27
Source File: TaskManagerGroupTest.java    From flink with Apache License 2.0 5 votes vote down vote up
@Test
public void testCreateQueryServiceMetricInfo() {
	TaskManagerMetricGroup tm = new TaskManagerMetricGroup(registry, "host", "id");

	QueryScopeInfo.TaskManagerQueryScopeInfo info = tm.createQueryServiceMetricInfo(new DummyCharacterFilter());
	assertEquals("", info.scope);
	assertEquals("id", info.taskManagerID);
}
 
Example #28
Source File: JobManagerGroupTest.java    From flink with Apache License 2.0 5 votes vote down vote up
@Test
public void testCreateQueryServiceMetricInfo() {
	MetricRegistryImpl registry = new MetricRegistryImpl(MetricRegistryConfiguration.defaultMetricRegistryConfiguration());
	JobManagerMetricGroup jm = new JobManagerMetricGroup(registry, "host");

	QueryScopeInfo.JobManagerQueryScopeInfo info = jm.createQueryServiceMetricInfo(new DummyCharacterFilter());
	assertEquals("", info.scope);
}
 
Example #29
Source File: TaskMetricGroup.java    From flink with Apache License 2.0 5 votes vote down vote up
@Override
protected QueryScopeInfo.TaskQueryScopeInfo createQueryServiceMetricInfo(CharacterFilter filter) {
	return new QueryScopeInfo.TaskQueryScopeInfo(
		this.parent.jobId.toString(),
		String.valueOf(this.vertexId),
		this.subtaskIndex);
}
 
Example #30
Source File: JobManagerJobGroupTest.java    From flink with Apache License 2.0 5 votes vote down vote up
@Test
public void testCreateQueryServiceMetricInfo() {
	JobID jid = new JobID();
	MetricRegistryImpl registry = new MetricRegistryImpl(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);
}