code: public String getComponentId(int taskId) {
      if (taskToComponentMap.containsKey(taskId)) {
        return taskToComponentMap.get(taskId);
      } else {
        return null;
      }
    }
docs: Gets the component id for the specified task id. The component id maps
  to a component id specified for a Spout or Bolt in the topology definition.
  
  @param taskId the task id
  @return the component id for the input task id