SPARK-3179. Add task OutputMetrics.

getBytesWrittenMethod? And same with the below naming?