org.apache.hadoop.hbase.tmpl.regionserver.RSStatusTmplImpl 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 implementation
// /home/apurtell/src/hbase/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/regionserver/RSStatusTmpl.jamon
package org.apache.hadoop.hbase.tmpl.regionserver;
// 27, 1
import java.util.*;
// 28, 1
import org.apache.hadoop.hbase.regionserver.HRegionServer;
// 29, 1
import org.apache.hadoop.hbase.HRegionInfo;
// 30, 1
import org.apache.hadoop.hbase.ServerName;
// 31, 1
import org.apache.hadoop.hbase.HBaseConfiguration;
// 32, 1
import org.apache.hadoop.hbase.protobuf.ProtobufUtil;
// 33, 1
import org.apache.hadoop.hbase.protobuf.generated.AdminProtos.ServerInfo;
// 34, 1
import org.apache.hadoop.hbase.zookeeper.MasterAddressTracker;
public class RSStatusTmplImpl
extends org.jamon.AbstractTemplateImpl
implements org.apache.hadoop.hbase.tmpl.regionserver.RSStatusTmpl.Intf
{
private final HRegionServer regionServer;
private final String bcv;
private final String format;
private final String bcn;
private final String filter;
protected static org.apache.hadoop.hbase.tmpl.regionserver.RSStatusTmpl.ImplData __jamon_setOptionalArguments(org.apache.hadoop.hbase.tmpl.regionserver.RSStatusTmpl.ImplData p_implData)
{
if(! p_implData.getBcv__IsNotDefault())
{
p_implData.setBcv("");
}
if(! p_implData.getFormat__IsNotDefault())
{
p_implData.setFormat("html");
}
if(! p_implData.getBcn__IsNotDefault())
{
p_implData.setBcn("");
}
if(! p_implData.getFilter__IsNotDefault())
{
p_implData.setFilter("general");
}
return p_implData;
}
public RSStatusTmplImpl(org.jamon.TemplateManager p_templateManager, org.apache.hadoop.hbase.tmpl.regionserver.RSStatusTmpl.ImplData p_implData)
{
super(p_templateManager, __jamon_setOptionalArguments(p_implData));
regionServer = p_implData.getRegionServer();
bcv = p_implData.getBcv();
format = p_implData.getFormat();
bcn = p_implData.getBcn();
filter = p_implData.getFilter();
}
@Override public void renderNoFlush(final java.io.Writer jamonWriter)
throws java.io.IOException
{
// 37, 1
if (format.equals("json") && bcn != null && bcn.length() > 0 )
{
// 37, 66
jamonWriter.write("\n ");
// 38, 3
{
org.apache.hadoop.hbase.tmpl.regionserver.BlockCacheViewTmpl __jamon__var_6 = new org.apache.hadoop.hbase.tmpl.regionserver.BlockCacheViewTmpl(this.getTemplateManager());
__jamon__var_6.renderNoFlush(jamonWriter, regionServer.getCacheConfig(), regionServer.getConfiguration(), bcn, bcv);
}
// 38, 136
jamonWriter.write("\n ");
// 39, 3
return;
}
// 40, 1
else if (format.equals("json") )
{
// 40, 34
jamonWriter.write("\n ");
// 41, 3
{
org.apache.hadoop.hbase.tmpl.common.TaskMonitorTmpl __jamon__var_7 = new org.apache.hadoop.hbase.tmpl.common.TaskMonitorTmpl(this.getTemplateManager());
__jamon__var_7.setFormat("json" );
__jamon__var_7.setFilter(filter);
__jamon__var_7.renderNoFlush(jamonWriter);
}
// 41, 68
jamonWriter.write("\n ");
// 42, 3
return;
}
// 43, 7
jamonWriter.write("\n");
// 44, 1
ServerInfo serverInfo = ProtobufUtil.getServerInfo(regionServer);
ServerName serverName = ProtobufUtil.toServerName(serverInfo.getServerName());
List onlineRegions = ProtobufUtil.getOnlineRegions(regionServer);
int masterInfoPort = regionServer.getConfiguration().getInt("hbase.master.info.port", 60010);
MasterAddressTracker masterAddressTracker = regionServer.getMasterAddressTracker();
ServerName masterServerName = masterAddressTracker == null ? null
: masterAddressTracker.getMasterAddress();
// 53, 1
jamonWriter.write("\n\n\n \n \n HBase Region Server: ");
// 60, 33
org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(serverName.getHostname()), jamonWriter);
// 60, 63
jamonWriter.write(" \n \n \n\n \n \n \n \n\n \n\n \n