svn merge -c 1444085 FIXES: YARN-362. Unexpected extra results when using webUI table search. Contributed by Ravi Prakash

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1444086 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jason Darrell Lowe 2013-02-08 15:56:38 +00:00
parent ccd19548db
commit b81c3b29a4
2 changed files with 22 additions and 6 deletions

View File

@ -304,6 +304,9 @@ Release 0.23.7 - UNRELEASED
YARN-364. AggregatedLogDeletionService can take too long to delete logs YARN-364. AggregatedLogDeletionService can take too long to delete logs
(jlowe) (jlowe)
YARN-362. Unexpected extra results when using webUI table search (Ravi
Prakash via jlowe)
Release 0.23.6 - UNRELEASED Release 0.23.6 - UNRELEASED
INCOMPATIBLE CHANGES INCOMPATIBLE CHANGES

View File

@ -74,19 +74,19 @@ jQuery.fn.dataTableExt.oApi.fnSetFilteringDelay = function ( oSettings, iDelay )
} }
function renderHadoopDate(data, type, full) { function renderHadoopDate(data, type, full) {
if (type === 'display') { if (type === 'display' || type === 'filter') {
if(data === '0') { if(data === '0') {
return "N/A"; return "N/A";
} }
return new Date(parseInt(data)).toUTCString(); return new Date(parseInt(data)).toUTCString();
} }
// 'filter', 'sort', 'type' and undefined all just use the number // 'sort', 'type' and undefined all just use the number
// If date is 0, then for purposes of sorting it should be consider max_int // If date is 0, then for purposes of sorting it should be consider max_int
return data === '0' ? '9007199254740992' : data; return data === '0' ? '9007199254740992' : data;
} }
function renderHadoopElapsedTime(data, type, full) { function renderHadoopElapsedTime(data, type, full) {
if (type === 'display') { if (type === 'display' || type === 'filter') {
var timeDiff = parseInt(data); var timeDiff = parseInt(data);
if(timeDiff < 0) if(timeDiff < 0)
return "N/A"; return "N/A";
@ -110,20 +110,33 @@ function renderHadoopElapsedTime(data, type, full) {
toReturn += "sec"; toReturn += "sec";
return toReturn; return toReturn;
} }
// 'filter', 'sort', 'type' and undefined all just use the number // 'sort', 'type' and undefined all just use the number
return data; return data;
} }
function parseHadoopID(data, type, full) { function parseHadoopID(data, type, full) {
if (type === 'display' || type === 'filter') { if (type === 'display') {
return data; return data;
} }
//Return the visible string rather than the entire HTML tag
if (type === 'filter') {
return data.split('>')[1].split('<')[0];
}
//Parse the ID for 'sort', 'type' and undefined //Parse the ID for 'sort', 'type' and undefined
//The number after the last '_' and before the end tag '<' //The number after the last '_' and before the end tag '<'
var splits = data.split('_'); var splits = data.split('_');
return splits[parseInt(splits.length-1)].split('<')[0]; return splits[parseInt(splits.length-1)].split('<')[0];
} }
//JSON array element is "20000 attempt_1360183373897_0001_m_000002_0"
function parseHadoopAttemptID(data, type, full) {
if (type === 'display' || type === 'filter') {
return data.split(' ')[1];
}
//For sorting use the order as defined in the JSON element
return data.split(' ')[0];
}
function parseHadoopProgress(data, type, full) { function parseHadoopProgress(data, type, full) {
if (type === 'display') { if (type === 'display') {
return data; return data;