本文整理汇总了Java中org.apache.hadoop.yarn.webapp.hamlet.Hamlet.DIV类的典型用法代码示例。如果您正苦于以下问题:Java DIV类的具体用法?Java DIV怎么用?Java DIV使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DIV类属于org.apache.hadoop.yarn.webapp.hamlet.Hamlet包,在下文中一共展示了DIV类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: render
import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.DIV; //导入依赖的package包/类
@Override public void render(Block html) {
UL<DIV<Hamlet>> mainList = html.
div("#nav").
h3("Cluster").
ul().
li().a(url("cluster"), "About")._().
li().a(url("nodes"), "Nodes")._().
li().a(url("nodelabels"), "Node Labels")._();
UL<LI<UL<DIV<Hamlet>>>> subAppsList = mainList.
li().a(url("apps"), "Applications").
ul();
subAppsList.li()._();
for (YarnApplicationState state : YarnApplicationState.values()) {
subAppsList.
li().a(url("apps", state.toString()), state.toString())._();
}
subAppsList._()._();
mainList.
li().a(url("scheduler"), "Scheduler")._()._().
h3("Tools").
ul().
li().a("/conf", "Configuration")._().
li().a("/logs", "Local logs")._().
li().a("/stacks", "Server stacks")._().
li().a("/jmx?qry=Hadoop:*", "Server metrics")._()._()._();
}
开发者ID:naver,项目名称:hadoop,代码行数:27,代码来源:NavBlock.java
示例2: createAttemptHeadRoomTable
import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.DIV; //导入依赖的package包/类
@Override
protected void createAttemptHeadRoomTable(Block html) {
RMAppAttempt attempt = getRMAppAttempt();
if (attempt != null) {
if (!isApplicationInFinalState(YarnApplicationAttemptState
.valueOf(attempt.getAppAttemptState().toString()))) {
RMAppAttemptMetrics metrics = attempt.getRMAppAttemptMetrics();
DIV<Hamlet> pdiv = html._(InfoBlock.class).div(_INFO_WRAP);
info("Application Attempt Overview").clear();
info("Application Attempt Metrics")._(
"Application Attempt Headroom : ", metrics == null ? "N/A" :
metrics.getApplicationAttemptHeadroom());
pdiv._();
}
}
}
开发者ID:naver,项目名称:hadoop,代码行数:17,代码来源:RMAppAttemptBlock.java
示例3: render
import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.DIV; //导入依赖的package包/类
@Override public void render(Block html) {
UL<DIV<Hamlet>> mainList = html.
div("#nav").
h3("Cluster").
ul().
li().a(url("cluster"), "About")._().
li().a(url("nodes"), "Nodes")._();
UL<LI<UL<DIV<Hamlet>>>> subAppsList = mainList.
li().a(url("apps"), "Applications").
ul();
subAppsList.li()._();
for (YarnApplicationState state : YarnApplicationState.values()) {
subAppsList.
li().a(url("apps", state.toString()), state.toString())._();
}
subAppsList._()._();
mainList.
li().a(url("scheduler"), "Scheduler")._()._().
h3("Tools").
ul().
li().a("/conf", "Configuration")._().
li().a("/logs", "Local logs")._().
li().a("/stacks", "Server stacks")._().
li().a("/metrics", "Server metrics")._()._()._();
}
开发者ID:Nextzero,项目名称:hadoop-2.6.0-cdh5.4.3,代码行数:26,代码来源:NavBlock.java
示例4: render
import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.DIV; //导入依赖的package包/类
@Override public void render(Block html) {
UL<DIV<Hamlet>> mainList = html.
div("#nav").
h3("Cluster").
ul().
li().a(url("cluster"), "About")._().
li().a(url("nodes"), "Nodes")._();
UL<LI<UL<DIV<Hamlet>>>> subAppsList = mainList.
li().a(url("apps"), "Applications").
ul();
subAppsList.li()._();
for (RMAppState state : RMAppState.values()) {
subAppsList.
li().a(url("apps", state.toString()), state.toString())._();
}
subAppsList._()._();
mainList.
li().a(url("scheduler"), "Scheduler")._()._().
h3("Tools").
ul().
li().a("/conf", "Configuration")._().
li().a("/logs", "Local logs")._().
li().a("/stacks", "Server stacks")._().
li().a("/metrics", "Server metrics")._()._()._();
}
开发者ID:ict-carch,项目名称:hadoop-plus,代码行数:26,代码来源:NavBlock.java
示例5: addProviderServiceOptions
import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.DIV; //导入依赖的package包/类
protected void addProviderServiceOptions(ProviderService providerService,
UL<DIV<Hamlet>> ul, ClusterDescription clusterStatus) {
Map<String, String> details = providerService.buildMonitorDetails(
clusterStatus);
if (null == details) {
return;
}
// Loop over each entry, placing the text in the UL, adding an anchor when the URL is non-null/empty
for (Entry<String, String> entry : details.entrySet()) {
String url = entry.getValue();
if (SliderUtils.isSet(url) ) {
ul.li()._(entry.getKey()).a(url, url)._();
} else {
ul.li(entry.getKey());
}
}
}
开发者ID:apache,项目名称:incubator-slider,代码行数:18,代码来源:IndexBlock.java
示例6: render
import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.DIV; //导入依赖的package包/类
@Override
protected void render(Block html) {
ContainerId containerID;
try {
containerID = ConverterUtils.toContainerId($(CONTAINER_ID));
} catch (IllegalArgumentException e) {
html.p()._("Invalid containerId " + $(CONTAINER_ID))._();
return;
}
DIV<Hamlet> div = html.div("#content");
Container container = this.nmContext.getContainers().get(containerID);
if (container == null) {
div.h1("Unknown Container. Container might have completed, "
+ "please go back to the previous page and retry.")._();
return;
}
ContainerInfo info = new ContainerInfo(this.nmContext, container);
info("Container information")
._("ContainerID", info.getId())
._("ContainerState", info.getState())
._("ExitStatus", info.getExitStatus())
._("Diagnostics", info.getDiagnostics())
._("User", info.getUser())
._("TotalMemoryNeeded", info.getMemoryNeeded())
._("TotalVCoresNeeded", info.getVCoresNeeded())
._("logs", info.getShortLogLink(), "Link to logs");
html._(InfoBlock.class);
}
开发者ID:naver,项目名称:hadoop,代码行数:31,代码来源:ContainerPage.java
示例7: render
import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.DIV; //导入依赖的package包/类
@Override
public void render(Block html) {
html._(MetricsOverviewTable.class);
UL<DIV<DIV<Hamlet>>> ul = html.
div("#cs-wrapper.ui-widget").
div(".ui-widget-header.ui-corner-top").
_("FifoScheduler Queue")._().
div("#cs.ui-widget-content.ui-corner-bottom").
ul();
if (fs == null) {
ul.
li().
a(_Q).$style(width(WIDTH_F)).
span().$style(Q_END)._("100% ")._().
span(".q", "default")._()._();
} else {
float used = sinfo.getUsedCapacity();
float set = sinfo.getCapacity();
float delta = Math.abs(set - used) + 0.001f;
ul.
li().
a(_Q).$style(width(WIDTH_F)).
$title(join("used:", percent(used))).
span().$style(Q_END)._("100%")._().
span().$style(join(width(delta), ';', used > set ? OVER : UNDER,
';', used > set ? left(set) : left(used)))._(".")._().
span(".q", sinfo.getQueueName())._().
_(QueueInfoBlock.class)._();
}
ul._()._().
script().$type("text/javascript").
_("$('#cs').hide();")._()._().
_(AppsBlock.class);
}
开发者ID:naver,项目名称:hadoop,代码行数:37,代码来源:DefaultSchedulerPage.java
示例8: createContainerLocalityTable
import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.DIV; //导入依赖的package包/类
private void createContainerLocalityTable(Block html) {
RMAppAttemptMetrics attemptMetrics = null;
RMAppAttempt attempt = getRMAppAttempt();
if (attempt != null) {
attemptMetrics = attempt.getRMAppAttemptMetrics();
}
if (attemptMetrics == null) {
return;
}
DIV<Hamlet> div = html.div(_INFO_WRAP);
TABLE<DIV<Hamlet>> table =
div.h3(
"Total Allocated Containers: "
+ attemptMetrics.getTotalAllocatedContainers()).h3("Each table cell"
+ " represents the number of NodeLocal/RackLocal/OffSwitch containers"
+ " satisfied by NodeLocal/RackLocal/OffSwitch resource requests.").table(
"#containerLocality");
table.
tr().
th(_TH, "").
th(_TH, "Node Local Request").
th(_TH, "Rack Local Request").
th(_TH, "Off Switch Request").
_();
String[] containersType =
{ "Num Node Local Containers (satisfied by)", "Num Rack Local Containers (satisfied by)",
"Num Off Switch Containers (satisfied by)" };
boolean odd = false;
for (int i = 0; i < attemptMetrics.getLocalityStatistics().length; i++) {
table.tr((odd = !odd) ? _ODD : _EVEN).td(containersType[i])
.td(String.valueOf(attemptMetrics.getLocalityStatistics()[i][0]))
.td(i == 0 ? "" : String.valueOf(attemptMetrics.getLocalityStatistics()[i][1]))
.td(i <= 1 ? "" : String.valueOf(attemptMetrics.getLocalityStatistics()[i][2]))._();
}
table._();
div._();
}
开发者ID:naver,项目名称:hadoop,代码行数:41,代码来源:RMAppAttemptBlock.java
示例9: render
import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.DIV; //导入依赖的package包/类
@Override protected void render(Block html) {
if (job == null) {
html.
p()._("Sorry, no counters for nonexistent", $(JOB_ID, "job"))._();
return;
}
if (!$(TASK_ID).isEmpty() && task == null) {
html.
p()._("Sorry, no counters for nonexistent", $(TASK_ID, "task"))._();
return;
}
String columnType = task == null ? "Task" : "Task Attempt";
TBODY<TABLE<DIV<Hamlet>>> tbody = html.
div(_INFO_WRAP).
table("#singleCounter").
thead().
tr().
th(".ui-state-default", columnType).
th(".ui-state-default", "Value")._()._().
tbody();
for (Map.Entry<String, Long> entry : values.entrySet()) {
TR<TBODY<TABLE<DIV<Hamlet>>>> row = tbody.tr();
String id = entry.getKey();
String val = entry.getValue().toString();
if(task != null) {
row.td(id);
row.td().br().$title(val)._()._(val)._();
} else {
row.td().a(url("singletaskcounter",entry.getKey(),
$(COUNTER_GROUP), $(COUNTER_NAME)), id)._();
row.td().br().$title(val)._().a(url("singletaskcounter",entry.getKey(),
$(COUNTER_GROUP), $(COUNTER_NAME)), val)._();
}
row._();
}
tbody._()._()._();
}
开发者ID:naver,项目名称:hadoop,代码行数:40,代码来源:SingleCounterBlock.java
示例10: render
import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.DIV; //导入依赖的package包/类
@Override protected void render(Block html) {
DIV<Hamlet> nav = html.
div("#nav").
h3("Application").
ul().
li().a(url("about"), "About")._().
li().a(url("app"), "Jobs")._()._();
if (app.getJob() != null) {
String jobid = MRApps.toString(app.getJob().getID());
nav.
h3("Job").
ul().
li().a(url("job", jobid), "Overview")._().
li().a(url("jobcounters", jobid), "Counters")._().
li().a(url("conf", jobid), "Configuration")._().
li().a(url("tasks", jobid, "m"), "Map tasks")._().
li().a(url("tasks", jobid, "r"), "Reduce tasks")._()._();
if (app.getTask() != null) {
String taskid = MRApps.toString(app.getTask().getID());
nav.
h3("Task").
ul().
li().a(url("task", taskid), "Task Overview")._().
li().a(url("taskcounters", taskid), "Counters")._()._();
}
}
nav.
h3("Tools").
ul().
li().a("/conf", "Configuration")._().
li().a("/logs", "Local logs")._().
li().a("/stacks", "Server stacks")._().
li().a("/jmx?qry=Hadoop:*", "Server metrics")._()._()._();
}
开发者ID:naver,项目名称:hadoop,代码行数:35,代码来源:HsNavBlock.java
示例11: render
import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.DIV; //导入依赖的package包/类
@Override public void render(Block html) {
boolean addErrorsAndWarningsLink = false;
Log log = LogFactory.getLog(NavBlock.class);
if (log instanceof Log4JLogger) {
Log4jWarningErrorMetricsAppender appender =
Log4jWarningErrorMetricsAppender.findAppender();
if (appender != null) {
addErrorsAndWarningsLink = true;
}
}
UL<DIV<Hamlet>> mainList = html.
div("#nav").
h3("Cluster").
ul().
li().a(url("cluster"), "About")._().
li().a(url("nodes"), "Nodes")._().
li().a(url("nodelabels"), "Node Labels")._();
UL<LI<UL<DIV<Hamlet>>>> subAppsList = mainList.
li().a(url("apps"), "Applications").
ul();
subAppsList.li()._();
for (YarnApplicationState state : YarnApplicationState.values()) {
subAppsList.
li().a(url("apps", state.toString()), state.toString())._();
}
subAppsList._()._();
UL<DIV<Hamlet>> tools = mainList.
li().a(url("scheduler"), "Scheduler")._()._().
h3("Tools").ul();
tools.li().a("/conf", "Configuration")._().
li().a("/logs", "Local logs")._().
li().a("/stacks", "Server stacks")._().
li().a("/jmx?qry=Hadoop:*", "Server metrics")._();
if (addErrorsAndWarningsLink) {
tools.li().a(url("errors-and-warnings"), "Errors/Warnings")._();
}
tools._()._();
}
开发者ID:aliyun-beta,项目名称:aliyun-oss-hadoop-fs,代码行数:40,代码来源:NavBlock.java
示例12: render
import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.DIV; //导入依赖的package包/类
@Override protected void render(Block html) {
DIV<Hamlet> nav = html.
div("#nav").
h3("Application").
ul().
li().a(url("about"), "About")._().
li().a(url("app"), "Jobs")._()._();
if (app.getJob() != null) {
String jobid = MRApps.toString(app.getJob().getID());
nav.
h3("Job").
ul().
li().a(url("job", jobid), "Overview")._().
li().a(url("jobcounters", jobid), "Counters")._().
li().a(url("conf", jobid), "Configuration")._().
li().a(url("tasks", jobid, "m"), "Map tasks")._().
li().a(url("tasks", jobid, "r"), "Reduce tasks")._()._();
if (app.getTask() != null) {
String taskid = MRApps.toString(app.getTask().getID());
nav.
h3("Task").
ul().
li().a(url("task", taskid), "Task Overview")._().
li().a(url("taskcounters", taskid), "Counters")._()._();
}
}
nav.
h3("Tools").
ul().
li().a("/conf", "Configuration")._().
li().a("/logs", "Local logs")._().
li().a("/stacks", "Server stacks")._().
li().a("/metrics", "Server metrics")._()._()._();
}
开发者ID:Nextzero,项目名称:hadoop-2.6.0-cdh5.4.3,代码行数:35,代码来源:HsNavBlock.java
示例13: render
import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.DIV; //导入依赖的package包/类
@Override
protected void render(Block html) {
ContainerId containerID;
try {
containerID = ConverterUtils.toContainerId($(CONTAINER_ID));
} catch (IllegalArgumentException e) {
html.p()._("Invalid containerId " + $(CONTAINER_ID))._();
return;
}
DIV<Hamlet> div = html.div("#content");
Container container = this.nmContext.getContainers().get(containerID);
if (container == null) {
div.h1("Unknown Container. Container might have completed, "
+ "please go back to the previous page and retry.")._();
return;
}
ContainerInfo info = new ContainerInfo(this.nmContext, container);
info("Container information")
._("ContainerID", info.getId())
._("ContainerState", info.getState())
._("ExitStatus", info.getExitStatus())
._("Diagnostics", info.getDiagnostics())
._("User", info.getUser())
._("TotalMemoryNeeded", info.getMemoryNeeded())
._("logs", info.getShortLogLink(), "Link to logs");
html._(InfoBlock.class);
}
开发者ID:ict-carch,项目名称:hadoop-plus,代码行数:30,代码来源:ContainerPage.java
示例14: render
import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.DIV; //导入依赖的package包/类
@Override
protected void render(Block html) {
ContainerId containerID;
try {
containerID = ContainerId.fromString($(CONTAINER_ID));
} catch (IllegalArgumentException e) {
html.p()._("Invalid containerId " + $(CONTAINER_ID))._();
return;
}
DIV<Hamlet> div = html.div("#content");
Container container = this.nmContext.getContainers().get(containerID);
if (container == null) {
div.h1("Unknown Container. Container might have completed, "
+ "please go back to the previous page and retry.")._();
return;
}
ContainerInfo info = new ContainerInfo(this.nmContext, container);
info("Container information")
._("ContainerID", info.getId())
._("ContainerState", info.getState())
._("ExitStatus", info.getExitStatus())
._("Diagnostics", info.getDiagnostics())
._("User", info.getUser())
._("TotalMemoryNeeded", info.getMemoryNeeded())
._("TotalVCoresNeeded", info.getVCoresNeeded())
._("TotalGPUsNeeded", info.getGPUsNeeded())
._("logs", info.getShortLogLink(), "Link to logs");
html._(InfoBlock.class);
}
开发者ID:hopshadoop,项目名称:hops,代码行数:32,代码来源:ContainerPage.java
注:本文中的org.apache.hadoop.yarn.webapp.hamlet.Hamlet.DIV类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论