Skip to content

Commit

Permalink
fix mapreduce
Browse files Browse the repository at this point in the history
  • Loading branch information
iliakur committed Sep 18, 2024
1 parent 6dae653 commit 5f8df39
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mapreduce/datadog_checks/mapreduce/mapreduce.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def check(self, instance):

# Report success after gathering all metrics from Application Master
if running_jobs:
job_id, metrics = next(running_jobs.items())
job_id, metrics = next(iter(running_jobs.items()))
am_address = self._get_url_base(metrics['tracking_url'])

self.service_check(
Expand Down Expand Up @@ -247,7 +247,7 @@ def _mapreduce_job_metrics(self, running_apps, addl_tags):
"""
running_jobs = {}

for app_name, tracking_url in running_apps.items():
for app_name, tracking_url in running_apps.values():

metrics_json = self._rest_request_to_json(
tracking_url, self.MAPREDUCE_JOBS_PATH, self.MAPREDUCE_SERVICE_CHECK
Expand Down Expand Up @@ -287,7 +287,7 @@ def _mapreduce_job_counters_metrics(self, running_jobs, addl_tags):
"""
Get custom metrics specified for each counter
"""
for job_metrics in running_jobs.items():
for job_metrics in running_jobs.values():
job_name = job_metrics['job_name']

# Check if the job_name exist in the custom metrics
Expand Down

0 comments on commit 5f8df39

Please sign in to comment.