class PigResource {

	@GET 
	@Path("/request/{requestId}/stats")
	@Produces( {MediaType.APPLICATION_JSON} )
	public Response getRequestStats(@PathParam("requestId") String requestId) throws IOException {
		logger.info("Request for getting stats for request " + requestId);
		PigRequestStats stats = PigJobServerImpl
		    .getPigJobServer()
		    .getRequestStats(requestId);
		return Response.ok()
		    .entity(new Gson().toJson(stats, PigRequestStats.class))
		    .build();
	}

}