# See http://wiki.apache.org/hadoop/GangliaMetrics
# Make sure you know whether you are using ganglia 3.0 or 3.1.
# If 3.1, you will have to patch your hadoop instance with HADOOP-4675
# And, yes, this file is named hadoop-metrics.properties rather than
# hbase-metrics.properties because we're leveraging the hadoop metrics
# package and hadoop-metrics.properties is an hardcoded-name, at least
# for the moment.
#
# See also http://hadoop.apache.org/hbase/docs/current/metrics.html


<% unless @ganglia %>
# Configuration of the "hbase" context for null
hbase.class=org.apache.hadoop.metrics.spi.NullContext
# Configuration of the "jvm" context for null
jvm.class=org.apache.hadoop.metrics.spi.NullContext
# Configuration of the "rpc" context for null
rpc.class=org.apache.hadoop.metrics.spi.NullContext
<% end %>

# Configuration of the "hbase" context for file
# hbase.class=org.apache.hadoop.hbase.metrics.file.TimeStampingFileContext
# hbase.period=10
# hbase.fileName=/tmp/metrics_hbase.log

# Configuration of the "hbase" context for ganglia
# Pick one: Ganglia 3.0 (former) or Ganglia 3.1 (latter)
#hbase.class=org.apache.hadoop.metrics.ganglia.GangliaContext
<% if @ganglia %>
hbase.class=org.apache.hadoop.metrics.ganglia.GangliaContext31
hbase.period=<%= @period %>
hbase.servers=<%= @ganglia_addr %>:<%= @ganglia_port %>
<% end %>

# Configuration of the "jvm" context for file
# jvm.class=org.apache.hadoop.hbase.metrics.file.TimeStampingFileContext
# jvm.period=10
# jvm.fileName=/tmp/metrics_jvm.log

# Configuration of the "jvm" context for ganglia
# Pick one: Ganglia 3.0 (former) or Ganglia 3.1 (latter)
# jvm.class=org.apache.hadoop.metrics.ganglia.GangliaContext
<% if @ganglia %>
jvm.class=org.apache.hadoop.metrics.ganglia.GangliaContext31
jvm.period=<%= @period %>
jvm.servers=<%= @ganglia_addr %>:<%= @ganglia_port %>
<% end %>

# Configuration of the "rpc" context for file
# rpc.class=org.apache.hadoop.hbase.metrics.file.TimeStampingFileContext
# rpc.period=10
# rpc.fileName=/tmp/metrics_rpc.log

# Configuration of the "rpc" context for ganglia
# Pick one: Ganglia 3.0 (former) or Ganglia 3.1 (latter)
# rpc.class=org.apache.hadoop.metrics.ganglia.GangliaContext
<% if @ganglia %>
rpc.class=org.apache.hadoop.metrics.ganglia.GangliaContext31
rpc.period=<%= @period %>
rpc.servers=<%= @ganglia_addr %>:<%= @ganglia_port %>
<% end %>
