Bird
0
0

You want to monitor Hadoop logs in real-time to detect errors as they happen. Which command combination is best?

hard📝 Application Q8 of 15
Hadoop - Cluster Administration
You want to monitor Hadoop logs in real-time to detect errors as they happen. Which command combination is best?
Aless /var/log/hadoop/hadoop.log
Bcat /var/log/hadoop/hadoop.log | grep ERROR
Chead -n 100 /var/log/hadoop/hadoop.log
Dtail -f /var/log/hadoop/hadoop.log | grep ERROR
Step-by-Step Solution
Solution:
  1. Step 1: Understand real-time monitoring

    tail -f shows new lines added to the file live.
  2. Step 2: Filter for errors

    Piping to grep ERROR filters only error lines in real-time.
  3. Final Answer:

    tail -f /var/log/hadoop/hadoop.log | grep ERROR -> Option D
  4. Quick Check:

    Real-time error monitoring = tail -f + grep [OK]
Quick Trick: Use tail -f with grep to watch errors live [OK]
Common Mistakes:
  • Using cat which shows static content
  • Using head which shows only start lines
  • Using less which is not real-time

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Hadoop Quizzes