All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.apache.hive.tmpl.QueryProfileTmplImpl Maven / Gradle / Ivy

There is a newer version: 4.0.1
Show newest version
// Autogenerated Jamon implementation
// /Users/vgarg/repos/hive.apache.master.latest/service/src/jamon/org/apache/hive/tmpl/QueryProfileTmpl.jamon

package org.apache.hive.tmpl;

// 24, 1
import java.util.*;
// 25, 1
import org.apache.hadoop.hive.ql.QueryDisplay;
// 26, 1
import org.apache.hadoop.hive.ql.QueryInfo;
// 27, 1
import org.apache.hadoop.hive.conf.HiveConf;

public class QueryProfileTmplImpl
  extends org.jamon.AbstractTemplateImpl
  implements org.apache.hive.tmpl.QueryProfileTmpl.Intf

{
  private final QueryInfo queryInfo;
  private final HiveConf hiveConf;
  protected static org.apache.hive.tmpl.QueryProfileTmpl.ImplData __jamon_setOptionalArguments(org.apache.hive.tmpl.QueryProfileTmpl.ImplData p_implData)
  {
    return p_implData;
  }
  public QueryProfileTmplImpl(org.jamon.TemplateManager p_templateManager, org.apache.hive.tmpl.QueryProfileTmpl.ImplData p_implData)
  {
    super(p_templateManager, __jamon_setOptionalArguments(p_implData));
    queryInfo = p_implData.getQueryInfo();
    hiveConf = p_implData.getHiveConf();
  }
  
  public void renderNoFlush(@SuppressWarnings({"unused","hiding"}) final java.io.Writer jamonWriter)
    throws java.io.IOException
  {
    // 29, 1
    jamonWriter.write("\n\n\n  \n    \n    HiveServer2\n    \n    \n\n    \n    \n    \n  \n\n  \n  
\n
\n
\n \n \"Hive\n
\n \n
\n
\n
\n\n\n "); // 70, 5 if (queryInfo == null ) { // 70, 30 jamonWriter.write("\n
\n

Query not found. It may have been deleted, increase hive.server2.webui.max.historic.queries\n to retain more historic query information.

\n
\n "); } // 75, 5 else { // 75, 12 jamonWriter.write("\n\n\n
\n
\n
\n

Query Information: "); // 81, 34 org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(queryInfo.getQueryDisplay() == null ? "Unknown" : queryInfo.getQueryDisplay().getQueryString()), jamonWriter); // 81, 134 jamonWriter.write("

\n
\n
\n
\n\n\n
\n \n
\n
\n "); // 96, 19 { // 96, 19 __jamon_innerUnit__baseProfile(jamonWriter, queryInfo ); } // 96, 59 jamonWriter.write("\n
\n
\n "); // 99, 19 { // 99, 19 __jamon_innerUnit__stages(jamonWriter, queryInfo ); } // 99, 54 jamonWriter.write("\n
\n
\n "); // 102, 19 { // 102, 19 __jamon_innerUnit__queryPlan(jamonWriter, queryInfo ); } // 102, 57 jamonWriter.write("\n
\n
\n "); // 105, 19 { // 105, 19 __jamon_innerUnit__perfLogging(jamonWriter, queryInfo ); } // 105, 59 jamonWriter.write("\n
\n
\n
\n\n "); } // 110, 10 jamonWriter.write("\n\n
\n
\n\n\n\n\n\n\n\n\n\n\n\n\n\n"); } // 120, 1 private void __jamon_innerUnit__baseProfile(@SuppressWarnings({"unused","hiding"}) final java.io.Writer jamonWriter, final QueryInfo queryInfo) throws java.io.IOException { // 124, 5 jamonWriter.write("\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n "); // 157, 9 if (queryInfo.getQueryDisplay() != null && queryInfo.getQueryDisplay().getErrorMessage() != null ) { // 157, 109 jamonWriter.write("\n \n \n \n \n "); } // 162, 15 jamonWriter.write("\n \n \n \n \n
User Name"); // 127, 17 org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(queryInfo.getUserName()), jamonWriter); // 127, 46 jamonWriter.write("
Query String"); // 131, 17 org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(queryInfo.getQueryDisplay() == null ? "Unknown" : queryInfo.getQueryDisplay().getQueryString()), jamonWriter); // 131, 117 jamonWriter.write("
Id"); // 135, 17 org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(queryInfo.getQueryDisplay() == null ? "Unknown" : queryInfo.getQueryDisplay().getQueryId()), jamonWriter); // 135, 113 jamonWriter.write("
Execution Engine"); // 139, 17 org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(queryInfo.getExecutionEngine()), jamonWriter); // 139, 53 jamonWriter.write("\n
State"); // 143, 17 org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(queryInfo.getState()), jamonWriter); // 143, 43 jamonWriter.write("
Opened Timestamp"); // 147, 17 org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(new Date(queryInfo.getBeginTime())), jamonWriter); // 147, 57 jamonWriter.write("
Opened (s)"); // 151, 17 org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(queryInfo.getElapsedTime()/1000), jamonWriter); // 151, 54 jamonWriter.write("
Closed Timestamp"); // 155, 17 org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(queryInfo.getEndTime() == null ? "Open" : new Date(queryInfo.getEndTime())), jamonWriter); // 155, 97 jamonWriter.write("
Error"); // 160, 21 org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(queryInfo.getQueryDisplay().getErrorMessage()), jamonWriter); // 160, 72 jamonWriter.write("
Latency (s)"); // 165, 17 org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(queryInfo.getRuntime() == null ? "Not finished" : queryInfo.getRuntime()/1000), jamonWriter); // 165, 100 jamonWriter.write("
\n"); } // 170, 1 private void __jamon_innerUnit__stages(@SuppressWarnings({"unused","hiding"}) final java.io.Writer jamonWriter, final QueryInfo queryInfo) throws java.io.IOException { // 174, 4 jamonWriter.write("\n \n \n \n \n \n \n \n \n\n "); // 184, 8 if (queryInfo.getQueryDisplay() != null && queryInfo.getQueryDisplay().getTaskDisplays() != null ) { // 184, 108 jamonWriter.write("\n "); // 185, 12 for (QueryDisplay.TaskDisplay taskDisplay : queryInfo.getQueryDisplay().getTaskDisplays() ) { // 185, 105 jamonWriter.write("\n \n \n \n \n \n \n \n \n "); } // 194, 19 jamonWriter.write("\n "); } // 195, 14 jamonWriter.write("\n
Stage IdStatusBegin TimeEnd TimeElapsed Time (s)Requires Lock
"); // 187, 24 org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(taskDisplay.getTaskId() + ":" + taskDisplay.getTaskType()), jamonWriter); // 187, 87 jamonWriter.write(""); // 188, 24 org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(taskDisplay.getStatus()), jamonWriter); // 188, 53 jamonWriter.write(""); // 189, 24 org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(taskDisplay.getBeginTime() == null ? "" : new Date(taskDisplay.getBeginTime())), jamonWriter); // 189, 108 jamonWriter.write(""); // 190, 24 org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(taskDisplay.getEndTime() == null ? "" : new Date(taskDisplay.getEndTime())), jamonWriter); // 190, 104 jamonWriter.write(""); // 191, 24 org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(taskDisplay.getElapsedTime() == null ? "" : taskDisplay.getElapsedTime()/1000), jamonWriter); // 191, 107 jamonWriter.write(" (s) "); // 192, 24 org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(taskDisplay.isRequireLock()), jamonWriter); // 192, 57 jamonWriter.write("
\n"); } // 200, 1 private void __jamon_innerUnit__queryPlan(@SuppressWarnings({"unused","hiding"}) final java.io.Writer jamonWriter, final QueryInfo queryInfo) throws java.io.IOException { // 204, 5 jamonWriter.write("
\n
Explain plan
\n
\n "); // 207, 9 if (hiveConf.getBoolVar(HiveConf.ConfVars.HIVE_LOG_EXPLAIN_OUTPUT) ) { // 207, 79 jamonWriter.write("\n
\n          ");
      // 209, 11
      org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(queryInfo.getQueryDisplay() == null ? "Unknown" : queryInfo.getQueryDisplay().getExplainPlan()), jamonWriter);
      // 209, 111
      jamonWriter.write("\n          
\n "); } // 211, 9 else { // 211, 16 jamonWriter.write("\n
\n          Set configuration hive.log.explain.output to true to view future query plans\n          
\n "); } // 215, 15 jamonWriter.write("\n
\n
\n"); } // 221, 1 private void __jamon_innerUnit__perfLogging(@SuppressWarnings({"unused","hiding"}) final java.io.Writer jamonWriter, final QueryInfo queryInfo) throws java.io.IOException { // 225, 5 jamonWriter.write("
\n

Compile-time metadata operations

\n \n \n \n \n \n\n "); // 233, 11 if (queryInfo.getQueryDisplay() != null && queryInfo.getQueryDisplay().getHmsTimings(QueryDisplay.Phase.COMPILATION) != null ) { // 233, 139 jamonWriter.write("\n "); // 234, 14 for (Map.Entry time : queryInfo.getQueryDisplay().getHmsTimings(QueryDisplay.Phase.COMPILATION).entrySet() ) { // 234, 138 jamonWriter.write("\n \n \n \n \n "); } // 239, 21 jamonWriter.write("\n "); } // 240, 16 jamonWriter.write("\n
Call NameTime (ms)
"); // 236, 26 org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(time.getKey()), jamonWriter); // 236, 45 jamonWriter.write(""); // 237, 26 org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(time.getValue()), jamonWriter); // 237, 47 jamonWriter.write("
\n
\n\n
\n

Execution-time metadata operations

\n \n \n \n \n \n\n "); // 252, 11 if (queryInfo.getQueryDisplay() != null && queryInfo.getQueryDisplay().getHmsTimings(QueryDisplay.Phase.EXECUTION) != null ) { // 252, 137 jamonWriter.write("\n "); // 253, 14 for (Map.Entry time : queryInfo.getQueryDisplay().getHmsTimings(QueryDisplay.Phase.EXECUTION).entrySet() ) { // 253, 136 jamonWriter.write("\n \n \n \n \n "); } // 258, 21 jamonWriter.write("\n "); } // 259, 16 jamonWriter.write("\n
Call NameTime (ms)
"); // 255, 26 org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(time.getKey()), jamonWriter); // 255, 45 jamonWriter.write(""); // 256, 26 org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(time.getValue()), jamonWriter); // 256, 47 jamonWriter.write("
\n
\n\n
\n

Compile-Time Perf-Logger

\n \n \n \n \n \n\n "); // 271, 11 if (queryInfo.getQueryDisplay() != null && queryInfo.getQueryDisplay().getPerfLogTimes(QueryDisplay.Phase.COMPILATION) != null ) { // 271, 141 jamonWriter.write("\n "); // 272, 14 for (Map.Entry time : queryInfo.getQueryDisplay().getPerfLogTimes(QueryDisplay.Phase.COMPILATION).entrySet() ) { // 272, 141 jamonWriter.write("\n \n \n \n \n "); } // 277, 21 jamonWriter.write("\n "); } // 278, 16 jamonWriter.write("\n
Compile-time Call NameTime (ms)
"); // 274, 26 org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(time.getKey()), jamonWriter); // 274, 45 jamonWriter.write(""); // 275, 26 org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(time.getValue()), jamonWriter); // 275, 47 jamonWriter.write("
\n
\n\n
\n

Execution-Time Perf-Logger

\n \n \n \n \n \n\n "); // 290, 11 if (queryInfo.getQueryDisplay() != null && queryInfo.getQueryDisplay().getPerfLogTimes(QueryDisplay.Phase.EXECUTION) != null ) { // 290, 139 jamonWriter.write("\n "); // 291, 14 for (Map.Entry time : queryInfo.getQueryDisplay().getPerfLogTimes(QueryDisplay.Phase.EXECUTION).entrySet() ) { // 291, 139 jamonWriter.write("\n \n \n \n \n "); } // 296, 21 jamonWriter.write("\n "); } // 297, 16 jamonWriter.write("\n
Execution-time Call NameTime (ms)
"); // 293, 26 org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(time.getKey()), jamonWriter); // 293, 45 jamonWriter.write(""); // 294, 26 org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(time.getValue()), jamonWriter); // 294, 47 jamonWriter.write("
\n
\n"); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy