org.apache.hadoop.hbase.tmpl.regionserver.ServerMetricsTmpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hbase-server Show documentation
Show all versions of hbase-server Show documentation
Server functionality for HBase
// Autogenerated Jamon proxy
// /Volumes/hbase-1.1.5/hbase/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/regionserver/ServerMetricsTmpl.jamon
package org.apache.hadoop.hbase.tmpl.regionserver;
// 23, 1
import java.util.*;
// 24, 1
import org.apache.hadoop.hbase.regionserver.HRegionServer;
// 25, 1
import org.apache.hadoop.hbase.regionserver.MetricsRegionServerWrapper;
// 26, 1
import org.apache.hadoop.hbase.util.Bytes;
// 27, 1
import org.apache.hadoop.hbase.HRegionInfo;
// 28, 1
import org.apache.hadoop.hbase.ServerName;
// 29, 1
import org.apache.hadoop.hbase.HBaseConfiguration;
// 30, 1
import org.apache.hadoop.hbase.protobuf.ProtobufUtil;
// 31, 1
import org.apache.hadoop.hbase.protobuf.generated.AdminProtos.ServerInfo;
// 32, 1
import org.apache.hadoop.hbase.protobuf.generated.ClusterStatusProtos.RegionLoad;
// 33, 1
import org.apache.hadoop.hbase.util.DirectMemoryUtils;
// 34, 1
import org.apache.hadoop.util.StringUtils;
// 35, 1
import com.yammer.metrics.stats.Snapshot;
// 36, 1
import java.lang.management.ManagementFactory;
@org.jamon.annotations.Template(
signature = "FB16FA9F74B30B8FFC482F2E105C6509",
requiredArguments = {
@org.jamon.annotations.Argument(name = "mWrap", type = "MetricsRegionServerWrapper")})
public class ServerMetricsTmpl
extends org.jamon.AbstractTemplateProxy
{
public ServerMetricsTmpl(org.jamon.TemplateManager p_manager)
{
super(p_manager);
}
public ServerMetricsTmpl()
{
super("/org/apache/hadoop/hbase/tmpl/regionserver/ServerMetricsTmpl");
}
protected interface Intf
extends org.jamon.AbstractTemplateProxy.Intf{
void renderNoFlush(final java.io.Writer jamonWriter) throws java.io.IOException;
}
public static class ImplData
extends org.jamon.AbstractTemplateProxy.ImplData
{
// 20, 1
public void setMWrap(MetricsRegionServerWrapper mWrap)
{
// 20, 1
m_mWrap = mWrap;
}
public MetricsRegionServerWrapper getMWrap()
{
return m_mWrap;
}
private MetricsRegionServerWrapper m_mWrap;
}
@Override
protected ImplData makeImplData()
{
return new ImplData();
}
@Override @SuppressWarnings("unchecked") public ImplData getImplData()
{
return (ImplData) super.getImplData();
}
@Override
public org.jamon.AbstractTemplateImpl constructImpl(Class extends org.jamon.AbstractTemplateImpl> p_class){
try
{
return p_class
.getConstructor(new Class [] { org.jamon.TemplateManager.class, ImplData.class })
.newInstance(new Object [] { getTemplateManager(), getImplData()});
}
catch (RuntimeException e)
{
throw e;
}
catch (Exception e)
{
throw new RuntimeException(e);
}
}
@Override
protected org.jamon.AbstractTemplateImpl constructImpl(){
return new ServerMetricsTmplImpl(getTemplateManager(), getImplData());
}
public org.jamon.Renderer makeRenderer(final MetricsRegionServerWrapper mWrap)
{
return new org.jamon.AbstractRenderer() {
@Override
public void renderTo(final java.io.Writer jamonWriter)
throws java.io.IOException
{
render(jamonWriter, mWrap);
}
};
}
public void render(final java.io.Writer jamonWriter, final MetricsRegionServerWrapper mWrap)
throws java.io.IOException
{
renderNoFlush(jamonWriter, mWrap);
jamonWriter.flush();
}
public void renderNoFlush(final java.io.Writer jamonWriter, final MetricsRegionServerWrapper mWrap)
throws java.io.IOException
{
ImplData implData = getImplData();
implData.setMWrap(mWrap);
Intf instance = (Intf) getTemplateManager().constructImpl(this);
instance.renderNoFlush(jamonWriter);
reset();
}
}