Search in sources :

Example 1 with NotFoundException

use of org.apache.flink.runtime.webmonitor.NotFoundException in project flink by apache.

the class AbstractExecutionGraphRequestHandler method handleJsonRequest.

@Override
public String handleJsonRequest(Map<String, String> pathParams, Map<String, String> queryParams, ActorGateway jobManager) throws Exception {
    String jidString = pathParams.get("jobid");
    if (jidString == null) {
        throw new RuntimeException("JobId parameter missing");
    }
    JobID jid;
    try {
        jid = JobID.fromHexString(jidString);
    } catch (Exception e) {
        throw new RuntimeException("Invalid JobID string '" + jidString + "': " + e.getMessage());
    }
    AccessExecutionGraph eg = executionGraphHolder.getExecutionGraph(jid, jobManager);
    if (eg == null) {
        throw new NotFoundException("Could not find job with id " + jid);
    }
    return handleRequest(eg, pathParams);
}
Also used : NotFoundException(org.apache.flink.runtime.webmonitor.NotFoundException) AccessExecutionGraph(org.apache.flink.runtime.executiongraph.AccessExecutionGraph) JobID(org.apache.flink.api.common.JobID) NotFoundException(org.apache.flink.runtime.webmonitor.NotFoundException)

Aggregations

JobID (org.apache.flink.api.common.JobID)1 AccessExecutionGraph (org.apache.flink.runtime.executiongraph.AccessExecutionGraph)1 NotFoundException (org.apache.flink.runtime.webmonitor.NotFoundException)1