@Override protected TaskCheckpointStatisticsWithSubtaskDetails handleCheckpointRequest( HandlerRequest<EmptyRequestBody, TaskCheckpointMessageParameters> request, AbstractCheckpointStats checkpointStats) throws RestHandlerException { final JobVertexID jobVertexId = request.getPathParameter(JobVertexIdPathParameter.class); final TaskStateStats taskStatistics = checkpointStats.getTaskStateStats(jobVertexId); if (taskStatistics == null) { throw new NotFoundException("There is no checkpoint statistics for task " + jobVertexId + '.'); } return createCheckpointDetails(checkpointStats, taskStatistics); }
@Override protected TaskCheckpointStatisticsWithSubtaskDetails handleCheckpointRequest( HandlerRequest<EmptyRequestBody, TaskCheckpointMessageParameters> request, AbstractCheckpointStats checkpointStats) throws RestHandlerException { final JobVertexID jobVertexId = request.getPathParameter(JobVertexIdPathParameter.class); final TaskStateStats taskStatistics = checkpointStats.getTaskStateStats(jobVertexId); if (taskStatistics == null) { throw new NotFoundException("There is no checkpoint statistics for task " + jobVertexId + '.'); } return createCheckpointDetails(checkpointStats, taskStatistics); }
@Override protected TaskCheckpointStatisticsWithSubtaskDetails handleCheckpointRequest( HandlerRequest<EmptyRequestBody, TaskCheckpointMessageParameters> request, AbstractCheckpointStats checkpointStats) throws RestHandlerException { final JobVertexID jobVertexId = request.getPathParameter(JobVertexIdPathParameter.class); final TaskStateStats taskStatistics = checkpointStats.getTaskStateStats(jobVertexId); if (taskStatistics == null) { throw new NotFoundException("There is no checkpoint statistics for task " + jobVertexId + '.'); } return createCheckpointDetails(checkpointStats, taskStatistics); }
TaskStateStats taskStats = checkpoint.getTaskStateStats(vertexId); if (taskStats == null) { return CompletableFuture.completedFuture("{}");
@Override public String handleRequest(AccessExecutionGraph graph, Map<String, String> params) throws Exception { long checkpointId = CheckpointStatsDetailsHandler.parseCheckpointId(params); if (checkpointId == -1) { return "{}"; } JobVertexID vertexId = AbstractJobVertexRequestHandler.parseJobVertexId(params); if (vertexId == null) { return "{}"; } CheckpointStatsSnapshot snapshot = graph.getCheckpointStatsSnapshot(); if (snapshot == null) { return "{}"; } AbstractCheckpointStats checkpoint = snapshot.getHistory().getCheckpointById(checkpointId); if (checkpoint != null) { cache.tryAdd(checkpoint); } else { checkpoint = cache.tryGet(checkpointId); if (checkpoint == null) { return "{}"; } } TaskStateStats taskStats = checkpoint.getTaskStateStats(vertexId); if (taskStats == null) { return "{}"; } return createSubtaskCheckpointDetailsJson(checkpoint, taskStats); }