Search in sources :

Example 6 with AccessExecutionJobVertex

use of org.apache.flink.runtime.executiongraph.AccessExecutionJobVertex in project flink by apache.

the class JobVertexTaskManagersHandlerTest method testJsonGeneration.

@Test
public void testJsonGeneration() throws Exception {
    AccessExecutionJobVertex originalTask = ArchivedJobGenerationUtils.getTestTask();
    AccessExecutionVertex originalSubtask = ArchivedJobGenerationUtils.getTestSubtask();
    String json = JobVertexTaskManagersHandler.createVertexDetailsByTaskManagerJson(originalTask, ArchivedJobGenerationUtils.getTestJob().getJobID().toString(), null);
    compareVertexTaskManagers(originalTask, originalSubtask, json);
}
Also used : AccessExecutionJobVertex(org.apache.flink.runtime.executiongraph.AccessExecutionJobVertex) AccessExecutionVertex(org.apache.flink.runtime.executiongraph.AccessExecutionVertex) Test(org.junit.Test)

Example 7 with AccessExecutionJobVertex

use of org.apache.flink.runtime.executiongraph.AccessExecutionJobVertex in project flink by apache.

the class SubtaskExecutionAttemptAccumulatorsHandlerTest method testArchiver.

@Test
public void testArchiver() throws Exception {
    JsonArchivist archivist = new SubtaskExecutionAttemptAccumulatorsHandler.SubtaskExecutionAttemptAccumulatorsJsonArchivist();
    AccessExecutionGraph originalJob = ArchivedJobGenerationUtils.getTestJob();
    AccessExecutionJobVertex originalTask = ArchivedJobGenerationUtils.getTestTask();
    AccessExecution originalAttempt = ArchivedJobGenerationUtils.getTestAttempt();
    Collection<ArchivedJson> archives = archivist.archiveJsonWithPath(originalJob);
    Assert.assertEquals(1, archives.size());
    ArchivedJson archive = archives.iterator().next();
    Assert.assertEquals("/jobs/" + originalJob.getJobID() + "/vertices/" + originalTask.getJobVertexId() + "/subtasks/" + originalAttempt.getParallelSubtaskIndex() + "/attempts/" + originalAttempt.getAttemptNumber() + "/accumulators", archive.getPath());
    compareAttemptAccumulators(originalAttempt, archive.getJson());
}
Also used : AccessExecutionJobVertex(org.apache.flink.runtime.executiongraph.AccessExecutionJobVertex) JsonArchivist(org.apache.flink.runtime.webmonitor.history.JsonArchivist) AccessExecution(org.apache.flink.runtime.executiongraph.AccessExecution) ArchivedJson(org.apache.flink.runtime.webmonitor.history.ArchivedJson) AccessExecutionGraph(org.apache.flink.runtime.executiongraph.AccessExecutionGraph) Test(org.junit.Test)

Example 8 with AccessExecutionJobVertex

use of org.apache.flink.runtime.executiongraph.AccessExecutionJobVertex in project flink by apache.

the class SubtaskExecutionAttemptDetailsHandlerTest method testJsonGeneration.

@Test
public void testJsonGeneration() throws Exception {
    AccessExecutionGraph originalJob = ArchivedJobGenerationUtils.getTestJob();
    AccessExecutionJobVertex originalTask = ArchivedJobGenerationUtils.getTestTask();
    AccessExecution originalAttempt = ArchivedJobGenerationUtils.getTestAttempt();
    String json = SubtaskExecutionAttemptDetailsHandler.createAttemptDetailsJson(originalAttempt, originalJob.getJobID().toString(), originalTask.getJobVertexId().toString(), null);
    compareAttemptDetails(originalAttempt, json);
}
Also used : AccessExecutionJobVertex(org.apache.flink.runtime.executiongraph.AccessExecutionJobVertex) AccessExecution(org.apache.flink.runtime.executiongraph.AccessExecution) AccessExecutionGraph(org.apache.flink.runtime.executiongraph.AccessExecutionGraph) Test(org.junit.Test)

Example 9 with AccessExecutionJobVertex

use of org.apache.flink.runtime.executiongraph.AccessExecutionJobVertex in project flink by apache.

the class SubtasksAllAccumulatorsHandlerTest method testJsonGeneration.

@Test
public void testJsonGeneration() throws Exception {
    AccessExecutionJobVertex originalTask = ArchivedJobGenerationUtils.getTestTask();
    String json = SubtasksAllAccumulatorsHandler.createSubtasksAccumulatorsJson(originalTask);
    compareSubtaskAccumulators(originalTask, json);
}
Also used : AccessExecutionJobVertex(org.apache.flink.runtime.executiongraph.AccessExecutionJobVertex) Test(org.junit.Test)

Example 10 with AccessExecutionJobVertex

use of org.apache.flink.runtime.executiongraph.AccessExecutionJobVertex in project flink by apache.

the class SubtasksTimesHandlerTest method testJsonGeneration.

@Test
public void testJsonGeneration() throws Exception {
    AccessExecutionJobVertex originalTask = ArchivedJobGenerationUtils.getTestTask();
    AccessExecution originalAttempt = ArchivedJobGenerationUtils.getTestAttempt();
    String json = SubtasksTimesHandler.createSubtaskTimesJson(originalTask);
    compareSubtaskTimes(originalTask, originalAttempt, json);
}
Also used : AccessExecutionJobVertex(org.apache.flink.runtime.executiongraph.AccessExecutionJobVertex) AccessExecution(org.apache.flink.runtime.executiongraph.AccessExecution) Test(org.junit.Test)

Aggregations

AccessExecutionJobVertex (org.apache.flink.runtime.executiongraph.AccessExecutionJobVertex)18 Test (org.junit.Test)13 AccessExecutionGraph (org.apache.flink.runtime.executiongraph.AccessExecutionGraph)8 ArchivedJson (org.apache.flink.runtime.webmonitor.history.ArchivedJson)7 JsonArchivist (org.apache.flink.runtime.webmonitor.history.JsonArchivist)7 AccessExecution (org.apache.flink.runtime.executiongraph.AccessExecution)5 AccessExecutionVertex (org.apache.flink.runtime.executiongraph.AccessExecutionVertex)5 JobStatus (org.apache.flink.runtime.jobgraph.JobStatus)3 JsonGenerator (com.fasterxml.jackson.core.JsonGenerator)2 StringWriter (java.io.StringWriter)2 ExecutionState (org.apache.flink.runtime.execution.ExecutionState)2 JsonNode (com.fasterxml.jackson.databind.JsonNode)1 ArrayNode (com.fasterxml.jackson.databind.node.ArrayNode)1 ArchivedExecutionJobVertex (org.apache.flink.runtime.executiongraph.ArchivedExecutionJobVertex)1 ExecutionJobVertex (org.apache.flink.runtime.executiongraph.ExecutionJobVertex)1 IOMetrics (org.apache.flink.runtime.executiongraph.IOMetrics)1 JobVertexID (org.apache.flink.runtime.jobgraph.JobVertexID)1 JobDetails (org.apache.flink.runtime.messages.webmonitor.JobDetails)1 OperatorBackPressureStats (org.apache.flink.runtime.webmonitor.OperatorBackPressureStats)1 MutableIOMetrics (org.apache.flink.runtime.webmonitor.utils.MutableIOMetrics)1