Search in sources :

Example 26 with AccessExecutionGraph

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

the class JobAccumulatorsHandlerTest method testArchiver.

@Test
public void testArchiver() throws Exception {
    JsonArchivist archivist = new JobAccumulatorsHandler.JobAccumulatorsJsonArchivist();
    AccessExecutionGraph originalJob = ArchivedJobGenerationUtils.getTestJob();
    Collection<ArchivedJson> archives = archivist.archiveJsonWithPath(originalJob);
    Assert.assertEquals(1, archives.size());
    ArchivedJson archive = archives.iterator().next();
    Assert.assertEquals("/jobs/" + originalJob.getJobID() + "/accumulators", archive.getPath());
    compareAccumulators(originalJob, archive.getJson());
}
Also used : JsonArchivist(org.apache.flink.runtime.webmonitor.history.JsonArchivist) ArchivedJson(org.apache.flink.runtime.webmonitor.history.ArchivedJson) AccessExecutionGraph(org.apache.flink.runtime.executiongraph.AccessExecutionGraph) Test(org.junit.Test)

Example 27 with AccessExecutionGraph

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

the class JobAccumulatorsHandlerTest method testJsonGeneration.

@Test
public void testJsonGeneration() throws Exception {
    AccessExecutionGraph originalJob = ArchivedJobGenerationUtils.getTestJob();
    String json = JobAccumulatorsHandler.createJobAccumulatorsJson(originalJob);
    compareAccumulators(originalJob, json);
}
Also used : AccessExecutionGraph(org.apache.flink.runtime.executiongraph.AccessExecutionGraph) Test(org.junit.Test)

Example 28 with AccessExecutionGraph

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

the class JobConfigHandlerTest method testArchiver.

@Test
public void testArchiver() throws Exception {
    JsonArchivist archivist = new JobConfigHandler.JobConfigJsonArchivist();
    AccessExecutionGraph originalJob = ArchivedJobGenerationUtils.getTestJob();
    Collection<ArchivedJson> archives = archivist.archiveJsonWithPath(originalJob);
    Assert.assertEquals(1, archives.size());
    ArchivedJson archive = archives.iterator().next();
    Assert.assertEquals("/jobs/" + originalJob.getJobID() + "/config", archive.getPath());
    compareJobConfig(originalJob, archive.getJson());
}
Also used : JsonArchivist(org.apache.flink.runtime.webmonitor.history.JsonArchivist) ArchivedJson(org.apache.flink.runtime.webmonitor.history.ArchivedJson) AccessExecutionGraph(org.apache.flink.runtime.executiongraph.AccessExecutionGraph) Test(org.junit.Test)

Example 29 with AccessExecutionGraph

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

the class JobConfigHandlerTest method testJsonGeneration.

public void testJsonGeneration() throws Exception {
    AccessExecutionGraph originalJob = ArchivedJobGenerationUtils.getTestJob();
    String answer = JobConfigHandler.createJobConfigJson(originalJob);
    compareJobConfig(originalJob, answer);
}
Also used : AccessExecutionGraph(org.apache.flink.runtime.executiongraph.AccessExecutionGraph)

Example 30 with AccessExecutionGraph

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

the class JobDetailsHandlerTest method testArchiver.

@Test
public void testArchiver() throws Exception {
    JsonArchivist archivist = new JobDetailsHandler.JobDetailsJsonArchivist();
    AccessExecutionGraph originalJob = ArchivedJobGenerationUtils.getTestJob();
    Collection<ArchivedJson> archives = archivist.archiveJsonWithPath(originalJob);
    Assert.assertEquals(2, archives.size());
    Iterator<ArchivedJson> iterator = archives.iterator();
    ArchivedJson archive1 = iterator.next();
    Assert.assertEquals("/jobs/" + originalJob.getJobID(), archive1.getPath());
    compareJobDetails(originalJob, archive1.getJson());
    ArchivedJson archive2 = iterator.next();
    Assert.assertEquals("/jobs/" + originalJob.getJobID() + "/vertices", archive2.getPath());
    compareJobDetails(originalJob, archive2.getJson());
}
Also used : JsonArchivist(org.apache.flink.runtime.webmonitor.history.JsonArchivist) ArchivedJson(org.apache.flink.runtime.webmonitor.history.ArchivedJson) AccessExecutionGraph(org.apache.flink.runtime.executiongraph.AccessExecutionGraph) Test(org.junit.Test)

Aggregations

AccessExecutionGraph (org.apache.flink.runtime.executiongraph.AccessExecutionGraph)40 Test (org.junit.Test)33 ArchivedJson (org.apache.flink.runtime.webmonitor.history.ArchivedJson)16 JsonArchivist (org.apache.flink.runtime.webmonitor.history.JsonArchivist)16 ExecutionGraphHolder (org.apache.flink.runtime.webmonitor.ExecutionGraphHolder)14 HashMap (java.util.HashMap)9 ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)8 CheckpointStatsHistory (org.apache.flink.runtime.checkpoint.CheckpointStatsHistory)8 CheckpointStatsSnapshot (org.apache.flink.runtime.checkpoint.CheckpointStatsSnapshot)8 AccessExecutionJobVertex (org.apache.flink.runtime.executiongraph.AccessExecutionJobVertex)8 JsonNode (com.fasterxml.jackson.databind.JsonNode)6 JobID (org.apache.flink.api.common.JobID)4 AccessExecution (org.apache.flink.runtime.executiongraph.AccessExecution)4 PendingCheckpointStats (org.apache.flink.runtime.checkpoint.PendingCheckpointStats)3 JobVertexID (org.apache.flink.runtime.jobgraph.JobVertexID)3 ExternalizedCheckpointSettings (org.apache.flink.runtime.jobgraph.tasks.ExternalizedCheckpointSettings)3 JobSnapshottingSettings (org.apache.flink.runtime.jobgraph.tasks.JobSnapshottingSettings)3 ArrayList (java.util.ArrayList)2 AbstractCheckpointStats (org.apache.flink.runtime.checkpoint.AbstractCheckpointStats)2 CompletedCheckpointStats (org.apache.flink.runtime.checkpoint.CompletedCheckpointStats)2