View Javadoc

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