org.apache.hadoop.hbase.tmpl.regionserver.ReplicationStatusTmplImpl 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/tmp/RM/hbase/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/regionserver/ReplicationStatusTmpl.jamon
package org.apache.hadoop.hbase.tmpl.regionserver;
// 23, 9
import java.util.*;
// 24, 9
import java.util.Map.Entry;
// 25, 9
import org.apache.hadoop.hbase.procedure2.util.StringUtils;
// 26, 9
import org.apache.hadoop.hbase.regionserver.HRegionServer;
// 27, 9
import org.apache.hadoop.hbase.replication.regionserver.ReplicationStatus;
public class ReplicationStatusTmplImpl
extends org.jamon.AbstractTemplateImpl
implements org.apache.hadoop.hbase.tmpl.regionserver.ReplicationStatusTmpl.Intf
{
private final HRegionServer regionServer;
protected static org.apache.hadoop.hbase.tmpl.regionserver.ReplicationStatusTmpl.ImplData __jamon_setOptionalArguments(org.apache.hadoop.hbase.tmpl.regionserver.ReplicationStatusTmpl.ImplData p_implData)
{
return p_implData;
}
public ReplicationStatusTmplImpl(org.jamon.TemplateManager p_templateManager, org.apache.hadoop.hbase.tmpl.regionserver.ReplicationStatusTmpl.ImplData p_implData)
{
super(p_templateManager, __jamon_setOptionalArguments(p_implData));
regionServer = p_implData.getRegionServer();
}
@Override public void renderNoFlush(final java.io.Writer jamonWriter)
throws java.io.IOException
{
// 30, 1
Map walGroupsReplicationStatus = regionServer.getWalGroupsReplicationStatus();
// 34, 1
if ((walGroupsReplicationStatus != null && walGroupsReplicationStatus.size() > 0) )
{
// 34, 86
jamonWriter.write("\n\n \n \n - Current Log
\n - Replication Delay
\n
\n \n \n ");
// 43, 17
{
// 43, 17
__jamon_innerUnit__currentLog(jamonWriter, walGroupsReplicationStatus);
}
// 43, 72
jamonWriter.write("\n \n \n ");
// 46, 17
{
// 46, 17
__jamon_innerUnit__replicationDelay(jamonWriter, walGroupsReplicationStatus);
}
// 46, 78
jamonWriter.write("\n \n \n \n If the replication delay is UNKNOWN, that means this walGroup doesn't start replicate yet and it may get disabled.\n If the size of log is 0, it means we are replicating current HLog, thus we can't get accurate size since it's not closed yet.
\n\n");
}
// 53, 1
else
{
// 53, 8
jamonWriter.write("\n No Replication Metrics for Peers
\n");
}
// 55, 7
jamonWriter.write("\n\n");
}
// 57, 1
private void __jamon_innerUnit__currentLog(final java.io.Writer jamonWriter, final Map metrics)
throws java.io.IOException
{
// 61, 5
jamonWriter.write("\n \n PeerId \n WalGroup \n Current Log \n Size \n Queue Size \n Offset \n \n ");
// 70, 13
for (Map.Entry entry: metrics.entrySet() )
{
// 70, 84
jamonWriter.write("\n \n ");
// 72, 26
org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(entry.getValue().getPeerId()), jamonWriter);
// 72, 60
jamonWriter.write(" \n ");
// 73, 26
org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(entry.getValue().getWalGroup()), jamonWriter);
// 73, 62
jamonWriter.write(" \n ");
// 74, 26
org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(entry.getValue().getCurrentPath()), jamonWriter);
// 74, 65
jamonWriter.write(" \n ");
// 75, 26
org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(StringUtils.humanSize(entry.getValue().getFileSize())), jamonWriter);
// 75, 85
jamonWriter.write(" \n ");
// 76, 26
org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(entry.getValue().getQueueSize()), jamonWriter);
// 76, 63
jamonWriter.write(" \n ");
// 77, 26
org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(StringUtils.humanSize(entry.getValue().getCurrentPosition())), jamonWriter);
// 77, 92
jamonWriter.write(" \n \n ");
}
// 79, 20
jamonWriter.write("\n
\n");
}
// 83, 1
private void __jamon_innerUnit__replicationDelay(final java.io.Writer jamonWriter, final Map metrics)
throws java.io.IOException
{
// 87, 5
jamonWriter.write("\n \n PeerId \n WalGroup \n Current Log \n Last Shipped Age \n Replication Delay \n \n ");
// 95, 13
for (Map.Entry entry: metrics.entrySet() )
{
// 95, 84
jamonWriter.write("\n \n ");
// 97, 26
org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(entry.getValue().getPeerId()), jamonWriter);
// 97, 60
jamonWriter.write(" \n ");
// 98, 26
org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(entry.getValue().getWalGroup()), jamonWriter);
// 98, 62
jamonWriter.write(" \n ");
// 99, 26
org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(entry.getValue().getCurrentPath()), jamonWriter);
// 99, 65
jamonWriter.write(" \n ");
// 100, 26
org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(StringUtils.humanTimeDiff(entry.getValue().getAgeOfLastShippedOp())), jamonWriter);
// 100, 99
jamonWriter.write(" \n ");
// 101, 26
org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(entry.getValue().getReplicationDelay() == Long.MAX_VALUE ? "UNKNOWN" : StringUtils.humanTimeDiff(entry.getValue().getReplicationDelay())), jamonWriter);
// 101, 168
jamonWriter.write(" \n \n ");
}
// 103, 20
jamonWriter.write("\n
\n");
}
}