View Javadoc

1   // Autogenerated Jamon proxy
2   // /home/stack/trunk/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/master/MasterStatusTmpl.jamon
3   
4   package org.apache.hadoop.hbase.tmpl.master;
5   
6   // 33, 1
7   import java.util.*;
8   // 34, 1
9   import org.apache.hadoop.util.StringUtils;
10  // 35, 1
11  import org.apache.hadoop.hbase.util.Bytes;
12  // 36, 1
13  import org.apache.hadoop.hbase.util.JvmVersion;
14  // 37, 1
15  import org.apache.hadoop.hbase.util.FSUtils;
16  // 38, 1
17  import org.apache.hadoop.hbase.master.HMaster;
18  // 39, 1
19  import org.apache.hadoop.hbase.master.AssignmentManager;
20  // 40, 1
21  import org.apache.hadoop.hbase.master.ServerManager;
22  // 41, 1
23  import org.apache.hadoop.hbase.HConstants;
24  // 42, 1
25  import org.apache.hadoop.hbase.NamespaceDescriptor;
26  // 43, 1
27  import org.apache.hadoop.hbase.ServerLoad;
28  // 44, 1
29  import org.apache.hadoop.hbase.ServerName;
30  // 45, 1
31  import org.apache.hadoop.hbase.client.HBaseAdmin;
32  // 46, 1
33  import org.apache.hadoop.hbase.client.HConnectionManager;
34  // 47, 1
35  import org.apache.hadoop.hbase.HTableDescriptor;
36  // 48, 1
37  import org.apache.hadoop.hbase.HBaseConfiguration;
38  // 49, 1
39  import org.apache.hadoop.hbase.TableName;
40  // 50, 1
41  import org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription;
42  // 51, 1
43  import org.apache.hadoop.hbase.master.DeadServer;
44  // 52, 1
45  import org.apache.hadoop.hbase.protobuf.ProtobufUtil;
46  
47  @org.jamon.annotations.Template(
48    signature = "9AA0E612863AE713EDFE69951613E099",
49    requiredArguments = {
50      @org.jamon.annotations.Argument(name = "master", type = "HMaster"),
51      @org.jamon.annotations.Argument(name = "admin", type = "HBaseAdmin")},
52    optionalArguments = {
53      @org.jamon.annotations.Argument(name = "catalogJanitorEnabled", type = "boolean"),
54      @org.jamon.annotations.Argument(name = "format", type = "String"),
55      @org.jamon.annotations.Argument(name = "serverManager", type = "ServerManager"),
56      @org.jamon.annotations.Argument(name = "assignmentManager", type = "AssignmentManager"),
57      @org.jamon.annotations.Argument(name = "frags", type = "Map<String,Integer>"),
58      @org.jamon.annotations.Argument(name = "deadServers", type = "Set<ServerName>"),
59      @org.jamon.annotations.Argument(name = "metaLocation", type = "ServerName"),
60      @org.jamon.annotations.Argument(name = "filter", type = "String"),
61      @org.jamon.annotations.Argument(name = "servers", type = "List<ServerName>")})
62  public class MasterStatusTmpl
63    extends org.jamon.AbstractTemplateProxy
64  {
65    
66    public MasterStatusTmpl(org.jamon.TemplateManager p_manager)
67    {
68       super(p_manager);
69    }
70    
71    public MasterStatusTmpl()
72    {
73       super("/org/apache/hadoop/hbase/tmpl/master/MasterStatusTmpl");
74    }
75    
76    protected interface Intf
77      extends org.jamon.AbstractTemplateProxy.Intf{
78      
79      void renderNoFlush(final java.io.Writer jamonWriter) throws java.io.IOException;
80      
81    }
82    public static class ImplData
83      extends org.jamon.AbstractTemplateProxy.ImplData
84    {
85      // 20, 1
86      public void setMaster(HMaster master)
87      {
88        // 20, 1
89        m_master = master;
90      }
91      public HMaster getMaster()
92      {
93        return m_master;
94      }
95      private HMaster m_master;
96      // 21, 1
97      public void setAdmin(HBaseAdmin admin)
98      {
99        // 21, 1
100       m_admin = admin;
101     }
102     public HBaseAdmin getAdmin()
103     {
104       return m_admin;
105     }
106     private HBaseAdmin m_admin;
107     // 26, 1
108     public void setCatalogJanitorEnabled(boolean catalogJanitorEnabled)
109     {
110       // 26, 1
111       m_catalogJanitorEnabled = catalogJanitorEnabled;
112       m_catalogJanitorEnabled__IsNotDefault = true;
113     }
114     public boolean getCatalogJanitorEnabled()
115     {
116       return m_catalogJanitorEnabled;
117     }
118     private boolean m_catalogJanitorEnabled;
119     public boolean getCatalogJanitorEnabled__IsNotDefault()
120     {
121       return m_catalogJanitorEnabled__IsNotDefault;
122     }
123     private boolean m_catalogJanitorEnabled__IsNotDefault;
124     // 28, 1
125     public void setFormat(String format)
126     {
127       // 28, 1
128       m_format = format;
129       m_format__IsNotDefault = true;
130     }
131     public String getFormat()
132     {
133       return m_format;
134     }
135     private String m_format;
136     public boolean getFormat__IsNotDefault()
137     {
138       return m_format__IsNotDefault;
139     }
140     private boolean m_format__IsNotDefault;
141     // 29, 1
142     public void setServerManager(ServerManager serverManager)
143     {
144       // 29, 1
145       m_serverManager = serverManager;
146       m_serverManager__IsNotDefault = true;
147     }
148     public ServerManager getServerManager()
149     {
150       return m_serverManager;
151     }
152     private ServerManager m_serverManager;
153     public boolean getServerManager__IsNotDefault()
154     {
155       return m_serverManager__IsNotDefault;
156     }
157     private boolean m_serverManager__IsNotDefault;
158     // 30, 1
159     public void setAssignmentManager(AssignmentManager assignmentManager)
160     {
161       // 30, 1
162       m_assignmentManager = assignmentManager;
163       m_assignmentManager__IsNotDefault = true;
164     }
165     public AssignmentManager getAssignmentManager()
166     {
167       return m_assignmentManager;
168     }
169     private AssignmentManager m_assignmentManager;
170     public boolean getAssignmentManager__IsNotDefault()
171     {
172       return m_assignmentManager__IsNotDefault;
173     }
174     private boolean m_assignmentManager__IsNotDefault;
175     // 22, 1
176     public void setFrags(Map<String,Integer> frags)
177     {
178       // 22, 1
179       m_frags = frags;
180       m_frags__IsNotDefault = true;
181     }
182     public Map<String,Integer> getFrags()
183     {
184       return m_frags;
185     }
186     private Map<String,Integer> m_frags;
187     public boolean getFrags__IsNotDefault()
188     {
189       return m_frags__IsNotDefault;
190     }
191     private boolean m_frags__IsNotDefault;
192     // 25, 1
193     public void setDeadServers(Set<ServerName> deadServers)
194     {
195       // 25, 1
196       m_deadServers = deadServers;
197       m_deadServers__IsNotDefault = true;
198     }
199     public Set<ServerName> getDeadServers()
200     {
201       return m_deadServers;
202     }
203     private Set<ServerName> m_deadServers;
204     public boolean getDeadServers__IsNotDefault()
205     {
206       return m_deadServers__IsNotDefault;
207     }
208     private boolean m_deadServers__IsNotDefault;
209     // 23, 1
210     public void setMetaLocation(ServerName metaLocation)
211     {
212       // 23, 1
213       m_metaLocation = metaLocation;
214       m_metaLocation__IsNotDefault = true;
215     }
216     public ServerName getMetaLocation()
217     {
218       return m_metaLocation;
219     }
220     private ServerName m_metaLocation;
221     public boolean getMetaLocation__IsNotDefault()
222     {
223       return m_metaLocation__IsNotDefault;
224     }
225     private boolean m_metaLocation__IsNotDefault;
226     // 27, 1
227     public void setFilter(String filter)
228     {
229       // 27, 1
230       m_filter = filter;
231       m_filter__IsNotDefault = true;
232     }
233     public String getFilter()
234     {
235       return m_filter;
236     }
237     private String m_filter;
238     public boolean getFilter__IsNotDefault()
239     {
240       return m_filter__IsNotDefault;
241     }
242     private boolean m_filter__IsNotDefault;
243     // 24, 1
244     public void setServers(List<ServerName> servers)
245     {
246       // 24, 1
247       m_servers = servers;
248       m_servers__IsNotDefault = true;
249     }
250     public List<ServerName> getServers()
251     {
252       return m_servers;
253     }
254     private List<ServerName> m_servers;
255     public boolean getServers__IsNotDefault()
256     {
257       return m_servers__IsNotDefault;
258     }
259     private boolean m_servers__IsNotDefault;
260   }
261   @Override
262   protected ImplData makeImplData()
263   {
264     return new ImplData();
265   }
266   @Override @SuppressWarnings("unchecked") public ImplData getImplData()
267   {
268     return (ImplData) super.getImplData();
269   }
270   
271   protected boolean catalogJanitorEnabled;
272   public final org.apache.hadoop.hbase.tmpl.master.MasterStatusTmpl setCatalogJanitorEnabled(boolean p_catalogJanitorEnabled)
273   {
274     (getImplData()).setCatalogJanitorEnabled(p_catalogJanitorEnabled);
275     return this;
276   }
277   
278   protected String format;
279   public final org.apache.hadoop.hbase.tmpl.master.MasterStatusTmpl setFormat(String p_format)
280   {
281     (getImplData()).setFormat(p_format);
282     return this;
283   }
284   
285   protected ServerManager serverManager;
286   public final org.apache.hadoop.hbase.tmpl.master.MasterStatusTmpl setServerManager(ServerManager p_serverManager)
287   {
288     (getImplData()).setServerManager(p_serverManager);
289     return this;
290   }
291   
292   protected AssignmentManager assignmentManager;
293   public final org.apache.hadoop.hbase.tmpl.master.MasterStatusTmpl setAssignmentManager(AssignmentManager p_assignmentManager)
294   {
295     (getImplData()).setAssignmentManager(p_assignmentManager);
296     return this;
297   }
298   
299   protected Map<String,Integer> frags;
300   public final org.apache.hadoop.hbase.tmpl.master.MasterStatusTmpl setFrags(Map<String,Integer> p_frags)
301   {
302     (getImplData()).setFrags(p_frags);
303     return this;
304   }
305   
306   protected Set<ServerName> deadServers;
307   public final org.apache.hadoop.hbase.tmpl.master.MasterStatusTmpl setDeadServers(Set<ServerName> p_deadServers)
308   {
309     (getImplData()).setDeadServers(p_deadServers);
310     return this;
311   }
312   
313   protected ServerName metaLocation;
314   public final org.apache.hadoop.hbase.tmpl.master.MasterStatusTmpl setMetaLocation(ServerName p_metaLocation)
315   {
316     (getImplData()).setMetaLocation(p_metaLocation);
317     return this;
318   }
319   
320   protected String filter;
321   public final org.apache.hadoop.hbase.tmpl.master.MasterStatusTmpl setFilter(String p_filter)
322   {
323     (getImplData()).setFilter(p_filter);
324     return this;
325   }
326   
327   protected List<ServerName> servers;
328   public final org.apache.hadoop.hbase.tmpl.master.MasterStatusTmpl setServers(List<ServerName> p_servers)
329   {
330     (getImplData()).setServers(p_servers);
331     return this;
332   }
333   
334   
335   @Override
336   public org.jamon.AbstractTemplateImpl constructImpl(Class<? extends org.jamon.AbstractTemplateImpl> p_class){
337     try
338     {
339       return p_class
340         .getConstructor(new Class [] { org.jamon.TemplateManager.class, ImplData.class })
341         .newInstance(new Object [] { getTemplateManager(), getImplData()});
342     }
343     catch (RuntimeException e)
344     {
345       throw e;
346     }
347     catch (Exception e)
348     {
349       throw new RuntimeException(e);
350     }
351   }
352   
353   @Override
354   protected org.jamon.AbstractTemplateImpl constructImpl(){
355     return new MasterStatusTmplImpl(getTemplateManager(), getImplData());
356   }
357   public org.jamon.Renderer makeRenderer(final HMaster master, final HBaseAdmin admin)
358   {
359     return new org.jamon.AbstractRenderer() {
360       @Override
361       public void renderTo(final java.io.Writer jamonWriter)
362         throws java.io.IOException
363       {
364         render(jamonWriter, master, admin);
365       }
366     };
367   }
368   
369   public void render(final java.io.Writer jamonWriter, final HMaster master, final HBaseAdmin admin)
370     throws java.io.IOException
371   {
372     renderNoFlush(jamonWriter, master, admin);
373     jamonWriter.flush();
374   }
375   public void renderNoFlush(final java.io.Writer jamonWriter, final HMaster master, final HBaseAdmin admin)
376     throws java.io.IOException
377   {
378     ImplData implData = getImplData();
379     implData.setMaster(master);
380     implData.setAdmin(admin);
381     Intf instance = (Intf) getTemplateManager().constructImpl(this);
382     instance.renderNoFlush(jamonWriter);
383     reset();
384   }
385   
386   
387 }