View Javadoc

1   // Autogenerated Jamon proxy
2   // /Users/misty/git/hbase/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/regionserver/ServerMetricsTmpl.jamon
3   
4   package org.apache.hadoop.hbase.tmpl.regionserver;
5   
6   // 23, 1
7   import java.util.*;
8   // 24, 1
9   import org.apache.hadoop.hbase.regionserver.HRegionServer;
10  // 25, 1
11  import org.apache.hadoop.hbase.regionserver.MetricsRegionServerWrapper;
12  // 26, 1
13  import org.apache.hadoop.hbase.util.Bytes;
14  // 27, 1
15  import org.apache.hadoop.hbase.HRegionInfo;
16  // 28, 1
17  import org.apache.hadoop.hbase.ServerName;
18  // 29, 1
19  import org.apache.hadoop.hbase.HBaseConfiguration;
20  // 30, 1
21  import org.apache.hadoop.hbase.protobuf.ProtobufUtil;
22  // 31, 1
23  import org.apache.hadoop.hbase.protobuf.generated.AdminProtos.ServerInfo;
24  // 32, 1
25  import org.apache.hadoop.hbase.protobuf.generated.ClusterStatusProtos.RegionLoad;
26  // 33, 1
27  import org.apache.hadoop.hbase.metrics.histogram.MetricsHistogram;
28  // 34, 1
29  import org.apache.hadoop.hbase.util.DirectMemoryUtils;
30  // 35, 1
31  import org.apache.hadoop.util.StringUtils;
32  // 36, 1
33  import com.yammer.metrics.stats.Snapshot;
34  // 37, 1
35  import java.lang.management.ManagementFactory;
36  
37  @org.jamon.annotations.Template(
38    signature = "FB16FA9F74B30B8FFC482F2E105C6509",
39    requiredArguments = {
40      @org.jamon.annotations.Argument(name = "mWrap", type = "MetricsRegionServerWrapper")})
41  public class ServerMetricsTmpl
42    extends org.jamon.AbstractTemplateProxy
43  {
44    
45    public ServerMetricsTmpl(org.jamon.TemplateManager p_manager)
46    {
47       super(p_manager);
48    }
49    
50    public ServerMetricsTmpl()
51    {
52       super("/org/apache/hadoop/hbase/tmpl/regionserver/ServerMetricsTmpl");
53    }
54    
55    protected interface Intf
56      extends org.jamon.AbstractTemplateProxy.Intf{
57      
58      void renderNoFlush(final java.io.Writer jamonWriter) throws java.io.IOException;
59      
60    }
61    public static class ImplData
62      extends org.jamon.AbstractTemplateProxy.ImplData
63    {
64      // 20, 1
65      public void setMWrap(MetricsRegionServerWrapper mWrap)
66      {
67        // 20, 1
68        m_mWrap = mWrap;
69      }
70      public MetricsRegionServerWrapper getMWrap()
71      {
72        return m_mWrap;
73      }
74      private MetricsRegionServerWrapper m_mWrap;
75    }
76    @Override
77    protected ImplData makeImplData()
78    {
79      return new ImplData();
80    }
81    @Override @SuppressWarnings("unchecked") public ImplData getImplData()
82    {
83      return (ImplData) super.getImplData();
84    }
85    
86    
87    @Override
88    public org.jamon.AbstractTemplateImpl constructImpl(Class<? extends org.jamon.AbstractTemplateImpl> p_class){
89      try
90      {
91        return p_class
92          .getConstructor(new Class [] { org.jamon.TemplateManager.class, ImplData.class })
93          .newInstance(new Object [] { getTemplateManager(), getImplData()});
94      }
95      catch (RuntimeException e)
96      {
97        throw e;
98      }
99      catch (Exception e)
100     {
101       throw new RuntimeException(e);
102     }
103   }
104   
105   @Override
106   protected org.jamon.AbstractTemplateImpl constructImpl(){
107     return new ServerMetricsTmplImpl(getTemplateManager(), getImplData());
108   }
109   public org.jamon.Renderer makeRenderer(final MetricsRegionServerWrapper mWrap)
110   {
111     return new org.jamon.AbstractRenderer() {
112       @Override
113       public void renderTo(final java.io.Writer jamonWriter)
114         throws java.io.IOException
115       {
116         render(jamonWriter, mWrap);
117       }
118     };
119   }
120   
121   public void render(final java.io.Writer jamonWriter, final MetricsRegionServerWrapper mWrap)
122     throws java.io.IOException
123   {
124     renderNoFlush(jamonWriter, mWrap);
125     jamonWriter.flush();
126   }
127   public void renderNoFlush(final java.io.Writer jamonWriter, final MetricsRegionServerWrapper mWrap)
128     throws java.io.IOException
129   {
130     ImplData implData = getImplData();
131     implData.setMWrap(mWrap);
132     Intf instance = (Intf) getTemplateManager().constructImpl(this);
133     instance.renderNoFlush(jamonWriter);
134     reset();
135   }
136   
137   
138 }