protected override void QCSave() { string strQCFile = ConfInfo.GetQCFile(this.Name); DFHelper.IniWriteValue("QC", this.txtLDateF.Name, this.txtLDateF.Text.Trim(), strQCFile); DFHelper.IniWriteValue("QC", this.txtLDateT.Name, this.txtLDateT.Text.Trim(), strQCFile); DFHelper.IniWriteValue("QC", this.cboBoxUserName.Name, this.cboBoxUserName.Text.Trim(), strQCFile); DFHelper.IniWriteValue("QC", this.cboBoxHostName.Name, this.cboBoxHostName.Text.Trim(), strQCFile); }
/* * (non-Javadoc) * @see org.apache.hadoop.yarn.webapp.view.HtmlBlock#render(org.apache.hadoop.yarn.webapp.view.HtmlBlock.Block) */ protected override void Render(HtmlBlock.Block html) { string jid = $(AMParams.JobId); if (jid.IsEmpty()) { html.P().("Sorry, can't do anything without a JobID.").(); return; } JobId jobID = MRApps.ToJobID(jid); Org.Apache.Hadoop.Mapreduce.V2.App.Job.Job job = appContext.GetJob(jobID); if (job == null) { html.P().("Sorry, ", jid, " not found.").(); return; } Path confPath = job.GetConfFile(); try { ConfInfo info = new ConfInfo(job); html.Div().H3(confPath.ToString()).(); Hamlet.TBODY <Hamlet.TABLE <Org.Apache.Hadoop.Yarn.Webapp.Hamlet.Hamlet> > tbody = html .Table("#conf").Thead().Tr().Th(JQueryUI.Th, "key").Th(JQueryUI.Th, "value").Th( JQueryUI.Th, "source chain").().().Tbody(); // Tasks table foreach (ConfEntryInfo entry in info.GetProperties()) { StringBuilder buffer = new StringBuilder(); string[] sources = entry.GetSource(); //Skip the last entry, because it is always the same HDFS file, and // output them in reverse order so most recent is output first bool first = true; for (int i = (sources.Length - 2); i >= 0; i--) { if (!first) { // \u2B05 is an arrow <-- buffer.Append(" \u2B05 "); } first = false; buffer.Append(sources[i]); } tbody.Tr().Td(entry.GetName()).Td(entry.GetValue()).Td(buffer.ToString()).(); } tbody.().Tfoot().Tr().Th().Input("search_init").$type(HamletSpec.InputType.text). $name("key").$value("key").().().Th().Input("search_init").$type(HamletSpec.InputType .text).$name("value").$value("value").().().Th().Input("search_init").$type(HamletSpec.InputType .text).$name("source chain").$value("source chain").().().().().(); } catch (IOException e) { Log.Error("Error while reading " + confPath, e); html.P().("Sorry got an error while reading conf file. ", confPath); } }
protected override void QCInit() { BusinessObject bo = new BusinessObject(); string s = "select distinct username from sysiolog order by username"; s += ";"; s += "select distinct hostname from sysiolog order by hostname"; bo.BusiDataSQL = new string[] { s }; bo.GetBusiData(); this.cboBoxUserName.Items.Add("È«²¿"); if (bo.BusiData.Tables[0].Rows.Count > 0) { for (int i = 0; i < bo.BusiData.Tables[0].Rows.Count; i++) { this.cboBoxUserName.Items.Add(bo.BusiData.Tables[0].Rows[i][0].ToString()); } } this.cboBoxUserName.SelectedIndex = 0; this.cboBoxHostName.Items.Add("È«²¿"); if (bo.BusiData.Tables[1].Rows.Count > 0) { for (int i = 0; i < bo.BusiData.Tables[1].Rows.Count; i++) { this.cboBoxHostName.Items.Add(bo.BusiData.Tables[1].Rows[i][0].ToString()); } } this.cboBoxHostName.SelectedIndex = 0; string strQCFile = ConfInfo.GetQCFile(this.Name); string strValue = DFHelper.IniReadValue("QC", this.txtLDateF.Name, strQCFile); if (strValue != "") { this.txtLDateF.Text = strValue; } strValue = DFHelper.IniReadValue("QC", this.txtLDateT.Name, strQCFile); if (strValue != "") { this.txtLDateT.Text = strValue; } strValue = DFHelper.IniReadValue("QC", this.cboBoxUserName.Name, strQCFile); if (strValue != "") { this.cboBoxUserName.SelectedIndex = this.cboBoxUserName.FindString(strValue); } strValue = DFHelper.IniReadValue("QC", this.cboBoxHostName.Name, strQCFile); if (strValue != "") { this.cboBoxHostName.SelectedIndex = this.cboBoxHostName.FindString(strValue); } }
public virtual ConfInfo GetJobConf(HttpServletRequest hsr, string jid) { Init(); Org.Apache.Hadoop.Mapreduce.V2.App.Job.Job job = AMWebServices.GetJobFromJobIdString (jid, ctx); CheckAccess(job, hsr); ConfInfo info; try { info = new ConfInfo(job); } catch (IOException) { throw new NotFoundException("unable to load configuration for job: " + jid); } return(info); }