CDAP-484 User and System Metrics Gauge Support

Gauge support for User and System Metrics and updated Mapreduce Metrics Writer to use gauge

https://issues.cask.co/browse/CDAP-484
That's ok. You don't have to make it as this pr

Sent from my iPhone

> On Oct 30, 2014, at 5:01 PM, Shankar <notifications@github.com> wrote:
> 
> In cdap-watchdog/src/main/java/co/cask/cdap/metrics/data/AggregatesTable.java:
> 
> > +            increments.put(Bytes.toBytes(tag.getTag()), tag.getValue());
> > +          }
> > +          aggregatesTable.increment(rowKey, increments);
> > +        } else if (record.getType() == MetricContentType.GAUGE) {
> > +          NavigableMap<byte[], byte[]> gauges = Maps.newTreeMap(Bytes.BYTES_COMPARATOR);
> > +
> > +          // The no tag value
> > +          gauges.put(Bytes.toBytes(MetricsConstants.EMPTY_TAG), Bytes.toBytes(record.getValue()));
> > +
> > +          // For each tag, increments corresponding values
> > +          for (TagMetric tag : record.getTags()) {
> > +            gauges.put(Bytes.toBytes(tag.getTag()), Bytes.toBytes(record.getValue()));
> > +          }
> > +          NavigableMap<byte[], NavigableMap<byte[], byte[]>> keyMap = Maps.newTreeMap(Bytes.BYTES_COMPARATOR);
> > +          keyMap.put(rowKey, gauges);
> > +          aggregatesTable.put(keyMap);
> @chtyim I had made those changes, can i send that as a separate PR ?, there are significant changes and it would increase the size of this PR.
> 
> —
> Reply to this email directly or view it on GitHub.