class SubtaskMetricsHandler extends AbstractMetricsHandler {

	@Override
	protected Map<String, String> getMapFor(Map<String, String> pathParams, MetricStore metrics) {
		String subtaskNumString = pathParams.get(SubtaskExecutionAttemptDetailsHandler.PARAMETER_SUBTASK_INDEX);
		int subtaskNum;
		try {
			subtaskNum = Integer.valueOf(subtaskNumString);
		} catch (NumberFormatException nfe) {
			return null;
		}
		MetricStore.ComponentMetricStore subtask = metrics.getSubtaskMetricStore(
			pathParams.get(JobMetricsHandler.PARAMETER_JOB_ID),
			pathParams.get(JobVertexMetricsHandler.PARAMETER_VERTEX_ID),
			subtaskNum);
		return subtask != null
			? subtask.metrics
			: null;
	}

	public  SubtaskMetricsHandler(Executor executor, MetricFetcher fetcher);

}