View Javadoc

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