Search in sources :

Example 26 with ArchivedJson

use of org.apache.flink.runtime.webmonitor.history.ArchivedJson in project flink by apache.

the class JobAccumulatorsHandler method archiveJsonWithPath.

@Override
public Collection<ArchivedJson> archiveJsonWithPath(AccessExecutionGraph graph) throws IOException {
    ResponseBody json = createJobAccumulatorsInfo(graph, true);
    String path = getMessageHeaders().getTargetRestEndpointURL().replace(':' + JobIDPathParameter.KEY, graph.getJobID().toString());
    return Collections.singleton(new ArchivedJson(path, json));
}
Also used : ArchivedJson(org.apache.flink.runtime.webmonitor.history.ArchivedJson) ResponseBody(org.apache.flink.runtime.rest.messages.ResponseBody)

Example 27 with ArchivedJson

use of org.apache.flink.runtime.webmonitor.history.ArchivedJson in project flink by apache.

the class JobConfigHandler method archiveJsonWithPath.

@Override
public Collection<ArchivedJson> archiveJsonWithPath(AccessExecutionGraph graph) throws IOException {
    ResponseBody json = createJobConfigInfo(graph);
    String path = getMessageHeaders().getTargetRestEndpointURL().replace(':' + JobIDPathParameter.KEY, graph.getJobID().toString());
    return Collections.singleton(new ArchivedJson(path, json));
}
Also used : ArchivedJson(org.apache.flink.runtime.webmonitor.history.ArchivedJson) ResponseBody(org.apache.flink.runtime.rest.messages.ResponseBody)

Example 28 with ArchivedJson

use of org.apache.flink.runtime.webmonitor.history.ArchivedJson in project flink by apache.

the class JobExceptionsHandler method archiveJsonWithPath.

@Override
public Collection<ArchivedJson> archiveJsonWithPath(ExecutionGraphInfo executionGraphInfo) throws IOException {
    ResponseBody json = createJobExceptionsInfo(executionGraphInfo, MAX_NUMBER_EXCEPTION_TO_REPORT);
    String path = getMessageHeaders().getTargetRestEndpointURL().replace(':' + JobIDPathParameter.KEY, executionGraphInfo.getJobId().toString());
    return Collections.singletonList(new ArchivedJson(path, json));
}
Also used : ArchivedJson(org.apache.flink.runtime.webmonitor.history.ArchivedJson) ResponseBody(org.apache.flink.runtime.rest.messages.ResponseBody)

Example 29 with ArchivedJson

use of org.apache.flink.runtime.webmonitor.history.ArchivedJson in project flink by apache.

the class JobDetailsHandler method archiveJsonWithPath.

@Override
public Collection<ArchivedJson> archiveJsonWithPath(AccessExecutionGraph graph) throws IOException {
    ResponseBody json = createJobDetailsInfo(graph, null);
    String path = getMessageHeaders().getTargetRestEndpointURL().replace(':' + JobIDPathParameter.KEY, graph.getJobID().toString());
    return Collections.singleton(new ArchivedJson(path, json));
}
Also used : ArchivedJson(org.apache.flink.runtime.webmonitor.history.ArchivedJson) ResponseBody(org.apache.flink.runtime.rest.messages.ResponseBody)

Example 30 with ArchivedJson

use of org.apache.flink.runtime.webmonitor.history.ArchivedJson in project flink by apache.

the class JobPlanHandler method archiveJsonWithPath.

@Override
public Collection<ArchivedJson> archiveJsonWithPath(AccessExecutionGraph graph) throws IOException {
    ResponseBody json = createJobPlanInfo(graph);
    String path = getMessageHeaders().getTargetRestEndpointURL().replace(':' + JobIDPathParameter.KEY, graph.getJobID().toString());
    return Collections.singleton(new ArchivedJson(path, json));
}
Also used : ArchivedJson(org.apache.flink.runtime.webmonitor.history.ArchivedJson) ResponseBody(org.apache.flink.runtime.rest.messages.ResponseBody)

Aggregations

ArchivedJson (org.apache.flink.runtime.webmonitor.history.ArchivedJson)35 JsonArchivist (org.apache.flink.runtime.webmonitor.history.JsonArchivist)18 Test (org.junit.Test)17 AccessExecutionGraph (org.apache.flink.runtime.executiongraph.AccessExecutionGraph)16 ResponseBody (org.apache.flink.runtime.rest.messages.ResponseBody)15 AccessExecutionJobVertex (org.apache.flink.runtime.executiongraph.AccessExecutionJobVertex)12 ArrayList (java.util.ArrayList)10 AccessExecution (org.apache.flink.runtime.executiongraph.AccessExecution)5 ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)4 JobID (org.apache.flink.api.common.JobID)4 CheckpointStatsHistory (org.apache.flink.runtime.checkpoint.CheckpointStatsHistory)4 CheckpointStatsSnapshot (org.apache.flink.runtime.checkpoint.CheckpointStatsSnapshot)4 JsonNode (com.fasterxml.jackson.databind.JsonNode)3 AbstractCheckpointStats (org.apache.flink.runtime.checkpoint.AbstractCheckpointStats)3 AccessExecutionVertex (org.apache.flink.runtime.executiongraph.AccessExecutionVertex)3 ByteArrayOutputStream (java.io.ByteArrayOutputStream)2 IOException (java.io.IOException)2 TaskStateStats (org.apache.flink.runtime.checkpoint.TaskStateStats)2 RestHandlerException (org.apache.flink.runtime.rest.handler.RestHandlerException)2 ErrorResponseBody (org.apache.flink.runtime.rest.messages.ErrorResponseBody)2