This repository has been archived by the owner on Jan 15, 2022. It is now read-only.
Add support to filter task / job counters #160
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We noticed that in scenarios where the number of tasks is very large (10K+), requesting for task counters ends up resulting in a very large payload. This PR adds a filter criteria (
includeCounter
) to the job / task endpoints to allow users to provide a set of counters they're interested in. This is similar to the existinginclude
clause. The response payload is then the filtered set of counters + include fields requested.Here's a couple of examples:
Job:
/api/v1/job/mycluster/my_job_id?include=jobKey&includeCounter=org.apache.hadoop.mapreduce.FileSystemCounter.HDFS_BYTES_WRITTEN
Response:
Task:
/api/v1/tasks/mycluster/my_job_id?include=taskType&include=taskId&includeCounter=org.apache.hadoop.mapreduce.TaskCounter.COMMITTED_HEAP_BYTES&includeCounter=org.apache.hadoop.mapreduce.TaskCounter.PHYSICAL_MEMORY_BYTES&includeCounter=org.apache.hadoop.mapreduce.TaskCounter.GC_TIME_MILLIS&includeCounter=org.apache.hadoop.mapreduce.TaskCounter.CPU_MILLISECONDS
Response: