Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Monitoring Hadoop

You're reading from  Monitoring Hadoop

Product type Book
Published in Apr 2015
Publisher
ISBN-13 9781783281558
Pages 100 pages
Edition 1st Edition
Languages
Author (1):
Aman Singh Aman Singh
Profile icon Aman Singh

Metrics configuration


The Hadoop daemons expose runtime metrics, which can be collected using plugins. The old Metrics1 system has been replaced by the new Metrics2 system, which supports the following:

  • Metrics collection using multiple plugins

  • Better integration with JMX

  • Better filters for cutting out noise

Before configuring metrics, it is important to understand which metrics and servlets are supported by each Hadoop version. For example, the servlet at /metrics works only with Metrics1 and the new servlet at /jmx works with both Metrics1 and Metrics2.

We need to configure a source, consumer, and poller for the framework:

  • Source or producer: A metric source class must implement the following interface:

    org.apache.hadoop.metrics2.MetricsSource
    
  • Consumer or sink: A consumer or sink must be implemented with the following line of code:

    org.apache.hadoop.metrics2.MetricsSink
    

    For example, the configuration for JobTracker sink and filter is as follows:

    jobtracker.sink.file.class=org.apache.hadoop.metrics2...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}