public Map<String, Object> getTaskContext() throws IOException {
    String jsonString = getEntityAsJson("/task-context", "task context");
    return jsonMapper.readValue(jsonString, new TypeReference<Map<String, Object>>() { });
  }
@return  the task context as a map of key to value
@throws IOException if there was an error fetching the task context from the servlet.
samza-yarn/src/main/java/org/apache/samza/webapp/ApplicationMasterRestClient.java